org.drools.eclipse
Class DroolsEclipsePlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.drools.eclipse.DroolsEclipsePlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class DroolsEclipsePlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin

The main plugin class to be used in the desktop.


Field Summary
static String BUILD_RESULT_PACKAGE
           
static String BUILD_RESULT_PACKAGE_DESCR
           
static int INTERNAL_ERROR
           
static String PLUGIN_ID
           
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
DroolsEclipsePlugin()
          The constructor.
 
Method Summary
 void clearCache()
           
 org.eclipse.core.resources.IResource findProcessResource(String processId)
           
 DRLInfo generateParsedResource(String content, org.eclipse.core.resources.IResource resource, boolean useCache, boolean compile)
           
 org.eclipse.swt.graphics.Color getColor(String type)
           
static DroolsEclipsePlugin getDefault()
          Returns the shared instance.
 DRLInfo.FunctionInfo getFunctionInfoByClass(String functionClassName)
           
static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String path)
          Returns an image descriptor for the image file at the given plug-in relative path.
 ProcessInfo getProcessInfo(String processId)
           
 ResourceBundle getResourceBundle()
          Returns the plugin's resource bundle,
static String getResourceString(String key)
          Returns the string from the plugin's resource bundle, or 'key' if not found.
 org.eclipse.ui.forms.FormColors getRuleBuilderFormColors(org.eclipse.swt.widgets.Display display)
          Form Colors, default colors for now.
 DRLInfo.RuleInfo getRuleInfoByClass(String ruleClassName)
           
 Map<ProcessInfo,List<org.jbpm.workflow.core.node.RuleSetNode>> getRuleSetNodeByFlowGroup(String flowGroup)
           
static String getUniqueIdentifier()
           
protected  void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
           
 void invalidateResource(org.eclipse.core.resources.IResource resource)
           
static void log(org.eclipse.core.runtime.IStatus status)
           
static void log(Throwable t)
           
 DRLInfo parseBRLResource(String content, org.eclipse.core.resources.IResource resource)
           
 DRLInfo parseGDSTResource(String content, org.eclipse.core.resources.IResource resource)
           
 ProcessInfo parseProcess(org.jbpm.process.core.Process process, org.eclipse.core.resources.IResource resource, org.drools.compiler.PackageBuilderConfiguration config)
           
 ProcessInfo parseProcess(String input, org.eclipse.core.resources.IResource resource)
           
 DRLInfo parseResource(AbstractRuleEditor editor, boolean useUnsavedContent, boolean compile)
           
 DRLInfo parseResource(org.eclipse.core.resources.IResource resource, boolean compile)
           
 List<DRLInfo> parseResources(List<ResourceDescr> resources)
           
 DRLInfo parseXLSResource(String content, org.eclipse.core.resources.IResource resource)
           
 boolean resetForceFullBuild()
           
 void setColor(String type, org.eclipse.swt.graphics.Color color)
           
 void setForceFullBuild()
           
 void start(org.osgi.framework.BundleContext context)
          This method is called upon plug-in activation
 void stop(org.osgi.framework.BundleContext context)
          This method is called when the plug-in is stopped
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTERNAL_ERROR

public static final int INTERNAL_ERROR
See Also:
Constant Field Values

PLUGIN_ID

public static final String PLUGIN_ID
See Also:
Constant Field Values

BUILD_RESULT_PACKAGE

public static final String BUILD_RESULT_PACKAGE
See Also:
Constant Field Values

BUILD_RESULT_PACKAGE_DESCR

public static final String BUILD_RESULT_PACKAGE_DESCR
See Also:
Constant Field Values
Constructor Detail

DroolsEclipsePlugin

public DroolsEclipsePlugin()
The constructor.

Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws Exception
This method is called upon plug-in activation

Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
Exception

clearCache

public void clearCache()

stop

public void stop(org.osgi.framework.BundleContext context)
          throws Exception
This method is called when the plug-in is stopped

Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
Exception

getDefault

public static DroolsEclipsePlugin getDefault()
Returns the shared instance.


getResourceString

public static String getResourceString(String key)
Returns the string from the plugin's resource bundle, or 'key' if not found.


getResourceBundle

public ResourceBundle getResourceBundle()
Returns the plugin's resource bundle,


getImageDescriptor

public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String path)
Returns an image descriptor for the image file at the given plug-in relative path. Uses the plug ins image registry to "cache" it.

Parameters:
path - the path
Returns:
the image descriptor

getUniqueIdentifier

public static String getUniqueIdentifier()

log

public static void log(Throwable t)

log

public static void log(org.eclipse.core.runtime.IStatus status)

getColor

public org.eclipse.swt.graphics.Color getColor(String type)

setColor

public void setColor(String type,
                     org.eclipse.swt.graphics.Color color)

initializeDefaultPreferences

protected void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore store)
Overrides:
initializeDefaultPreferences in class org.eclipse.ui.plugin.AbstractUIPlugin

parseResources

public List<DRLInfo> parseResources(List<ResourceDescr> resources)

parseResource

public DRLInfo parseResource(org.eclipse.core.resources.IResource resource,
                             boolean compile)
                      throws org.drools.compiler.DroolsParserException
Throws:
org.drools.compiler.DroolsParserException

parseResource

public DRLInfo parseResource(AbstractRuleEditor editor,
                             boolean useUnsavedContent,
                             boolean compile)
                      throws org.drools.compiler.DroolsParserException
Throws:
org.drools.compiler.DroolsParserException

parseXLSResource

public DRLInfo parseXLSResource(String content,
                                org.eclipse.core.resources.IResource resource)
                         throws org.drools.compiler.DroolsParserException
Throws:
org.drools.compiler.DroolsParserException

parseBRLResource

public DRLInfo parseBRLResource(String content,
                                org.eclipse.core.resources.IResource resource)
                         throws org.drools.compiler.DroolsParserException
Throws:
org.drools.compiler.DroolsParserException

parseGDSTResource

public DRLInfo parseGDSTResource(String content,
                                 org.eclipse.core.resources.IResource resource)
                          throws org.drools.compiler.DroolsParserException
Throws:
org.drools.compiler.DroolsParserException

invalidateResource

public void invalidateResource(org.eclipse.core.resources.IResource resource)

generateParsedResource

public DRLInfo generateParsedResource(String content,
                                      org.eclipse.core.resources.IResource resource,
                                      boolean useCache,
                                      boolean compile)
                               throws org.drools.compiler.DroolsParserException
Throws:
org.drools.compiler.DroolsParserException

getRuleInfoByClass

public DRLInfo.RuleInfo getRuleInfoByClass(String ruleClassName)

getFunctionInfoByClass

public DRLInfo.FunctionInfo getFunctionInfoByClass(String functionClassName)

parseProcess

public ProcessInfo parseProcess(String input,
                                org.eclipse.core.resources.IResource resource)
                         throws Exception
Throws:
Exception

getProcessInfo

public ProcessInfo getProcessInfo(String processId)

getRuleSetNodeByFlowGroup

public Map<ProcessInfo,List<org.jbpm.workflow.core.node.RuleSetNode>> getRuleSetNodeByFlowGroup(String flowGroup)

findProcessResource

public org.eclipse.core.resources.IResource findProcessResource(String processId)

parseProcess

public ProcessInfo parseProcess(org.jbpm.process.core.Process process,
                                org.eclipse.core.resources.IResource resource,
                                org.drools.compiler.PackageBuilderConfiguration config)

getRuleBuilderFormColors

public org.eclipse.ui.forms.FormColors getRuleBuilderFormColors(org.eclipse.swt.widgets.Display display)
Form Colors, default colors for now.

Parameters:
display -
Returns:

resetForceFullBuild

public boolean resetForceFullBuild()

setForceFullBuild

public void setForceFullBuild()


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.