org.sintef.mofscript.editor
Class MofScriptEditorPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.sintef.mofscript.editor.MofScriptEditorPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator, ExecutionMessageListener

public class MofScriptEditorPlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin
implements ExecutionMessageListener

The main MOFSCript plugin class


Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
MofScriptEditorPlugin()
          The default constructor.
 
Method Summary
protected  void checkUMLSupport()
          Tests if UML2 classes are available by dynamic instantitation If they are, the editor (and runtime) can provide extended support for UML2
 void executionMessage(java.lang.String type, java.lang.String description)
          ExecutionProductionListener interface Handles the executionMessage event.
static org.eclipse.ui.IWorkbenchPage getActivePage()
          Returns the active page
 MofScriptScanner getCodeScanner()
          Returns the plugins scanner
 ColorManager getColorManager()
          Returns the plugins color manager
static MofScriptEditorPlugin getDefault()
          Returns the shared instance.
static ExecutionUtility getExecutionUtility()
          Returns the execution utility instance
 org.eclipse.swt.widgets.FileDialog getFileDialog()
          REturns a file dialog
 org.eclipse.swt.widgets.FileDialog getFileSaveDialog()
          Returns a file save dialog
 ParserUtil getParserUtil()
          Returns the parser util used for access to parsing and exeuction
 java.lang.String getPreferenceString(java.lang.String what)
          Returns a preference String from the preference store
 java.util.ResourceBundle getResourceBundle()
          Returns the plugin's resource bundle,
static java.lang.String getResourceString(java.lang.String key)
          Returns the string from the plugin's resource bundle, or 'key' if not found.
static org.eclipse.ui.console.MessageConsoleStream getStream()
          Returns the message stream associated with the console
 boolean hasUML2Support()
          Returns a flag for UML2 support
 void initializeDefaultPluginPreferences()
           
static void print(java.lang.String s)
          prints a message to the console
static void println(java.lang.String s)
          Prints a message to the console
 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, initializeDefaultPreferences, 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
 

Constructor Detail

MofScriptEditorPlugin

public MofScriptEditorPlugin()
The default constructor.

Method Detail

checkUMLSupport

protected void checkUMLSupport()
Tests if UML2 classes are available by dynamic instantitation If they are, the editor (and runtime) can provide extended support for UML2


start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.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:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.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:
java.lang.Exception

getDefault

public static MofScriptEditorPlugin getDefault()
Returns the shared instance.


getActivePage

public static org.eclipse.ui.IWorkbenchPage getActivePage()
Returns the active page

Returns:

getResourceString

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


getExecutionUtility

public static ExecutionUtility getExecutionUtility()
Returns the execution utility instance

Returns:

getResourceBundle

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


getColorManager

public ColorManager getColorManager()
Returns the plugins color manager

Returns:

getCodeScanner

public MofScriptScanner getCodeScanner()
Returns the plugins scanner

Returns:

hasUML2Support

public boolean hasUML2Support()
Returns a flag for UML2 support

Returns:

getParserUtil

public ParserUtil getParserUtil()
Returns the parser util used for access to parsing and exeuction

Returns:

getFileDialog

public org.eclipse.swt.widgets.FileDialog getFileDialog()
REturns a file dialog

Returns:

getFileSaveDialog

public org.eclipse.swt.widgets.FileDialog getFileSaveDialog()
Returns a file save dialog

Returns:

initializeDefaultPluginPreferences

public void initializeDefaultPluginPreferences()
Overrides:
initializeDefaultPluginPreferences in class org.eclipse.ui.plugin.AbstractUIPlugin

getPreferenceString

public java.lang.String getPreferenceString(java.lang.String what)
Returns a preference String from the preference store

Parameters:
what -
Returns:

print

public static void print(java.lang.String s)
prints a message to the console

Parameters:
s -

println

public static void println(java.lang.String s)
Prints a message to the console

Parameters:
s -

getStream

public static org.eclipse.ui.console.MessageConsoleStream getStream()
Returns the message stream associated with the console

Returns:

executionMessage

public void executionMessage(java.lang.String type,
                             java.lang.String description)
ExecutionProductionListener interface Handles the executionMessage event.

Specified by:
executionMessage in interface ExecutionMessageListener