vocleditor
Class VOCLEditorPlugin

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

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

The main VOCLEditor plugin class to be used in the desktop.


Field Summary
static java.lang.String ID
          The ID-String for the plugin
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
VOCLEditorPlugin()
          The constructor.
 
Method Summary
static java.util.List getAllClassifierRoleTypes(VOCLModel.Constraint constraint)
          Returns the list of classifier role types in the constraint.
static java.util.List getAllClassifierRoleTypes(VOCLModel.NavExp navExp)
          Returns the list of classifer role types in the navigation expression.
static java.util.List getAllConditions(VOCLModel.Constraint constraint)
          Returns all condition in the constraint.
static java.util.List getAllConditions(VOCLModel.NavExp navExp)
          Returns all condition in the navigation expression.
static java.util.List getAllTypes(VOCLModel.ClassifierRole classifierRole)
          Returns all types in the classifier role.
static java.util.List getAllTypes(VOCLModel.Constraint constraint)
          Returns all types in the constraint.
static java.util.List getAllTypes(VOCLModel.NavExp navExp)
          Returns all types in the navigation expression.
static VOCLModel.Constraint getConstraint(VOCLModel.ModelElement melm)
          convenience method to find the Constraint a ModelElement belongs to (saves some links in the VOCLModel)
static VOCLEditorPlugin getDefault()
          Returns the shared instance.
 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 void printDebug(java.lang.String x)
          Global method for output of debug-messages Will output the message if VOCLEditorConstants.debugMode is true
 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
getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
The ID-String for the plugin

See Also:
Constant Field Values
Constructor Detail

VOCLEditorPlugin

public VOCLEditorPlugin()
The constructor.

Method Detail

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
See Also:
AbstractUIPlugin.start(org.osgi.framework.BundleContext)

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
See Also:
AbstractUIPlugin.stop(org.osgi.framework.BundleContext)

getDefault

public static VOCLEditorPlugin getDefault()
Returns the shared instance.

Returns:
the static instance of the plugin

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.

Parameters:
key - The key to search for
Returns:
the String with name 'key' or 'key' if not found.

getResourceBundle

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

Returns:
null as it is not needed

printDebug

public static void printDebug(java.lang.String x)
Global method for output of debug-messages Will output the message if VOCLEditorConstants.debugMode is true

Parameters:
x - The message to ouput

getConstraint

public static VOCLModel.Constraint getConstraint(VOCLModel.ModelElement melm)
convenience method to find the Constraint a ModelElement belongs to (saves some links in the VOCLModel)

Parameters:
melm - a VOCLModel.ModelElement
Returns:
the (containing) Constraint or null

getAllTypes

public static java.util.List getAllTypes(VOCLModel.Constraint constraint)
Returns all types in the constraint.

Parameters:
constraint - the constraint
Returns:
the list of types

getAllTypes

public static java.util.List getAllTypes(VOCLModel.NavExp navExp)
Returns all types in the navigation expression.

Parameters:
navExp - the navigation expression
Returns:
the list of types

getAllTypes

public static java.util.List getAllTypes(VOCLModel.ClassifierRole classifierRole)
Returns all types in the classifier role.

Parameters:
classifierRole - the classifier role
Returns:
the list of types

getAllClassifierRoleTypes

public static java.util.List getAllClassifierRoleTypes(VOCLModel.Constraint constraint)
Returns the list of classifier role types in the constraint.

Parameters:
constraint - the constraint
Returns:
the list of classifier role types

getAllClassifierRoleTypes

public static java.util.List getAllClassifierRoleTypes(VOCLModel.NavExp navExp)
Returns the list of classifer role types in the navigation expression.

Parameters:
navExp - the navigation expression
Returns:
the list of classifer role types

getAllConditions

public static java.util.List getAllConditions(VOCLModel.Constraint constraint)
Returns all condition in the constraint.

Parameters:
constraint - the constraint
Returns:
the list of all condition

getAllConditions

public static java.util.List getAllConditions(VOCLModel.NavExp navExp)
Returns all condition in the navigation expression.

Parameters:
navExp - the navigation expression
Returns:
the list all condition