de.cau.cs.kieler.sim.kiem.automated
Class KiemAutomatedPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by de.cau.cs.kieler.sim.kiem.automated.KiemAutomatedPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class KiemAutomatedPlugin
extends AbstractUIPlugin

The activator class controls the plug-in life cycle.

Rating proposed yellow
(2010-01-29)

Field Summary
static int AUTO_TIMEOUT_DEFAULT
          the default value for the automation timeout.
static String AUTO_TIMEOUT_ID
          the timeout for the automation.
static String PLUGIN_ID
          The plug-in id.
static String VIEW_ID
          the id of the view for displaying results.
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
KiemAutomatedPlugin()
          The constructor.
 
Method Summary
static void addErrorListener(GenericErrorHandler.StatusListener listener)
          Add a new listener to the generic error handler.
static KiemAutomatedPlugin getDefault()
          Returns the shared instance.
static GenericErrorHandler getErrorHandler()
          Getter for KIELERs generic error handler.
static Execution getKiemExecution()
          Getter for the execution inside the KIEM.
static List<IAutomationListener> getListeners()
          Get the list of listeners on the extension point.
 String load(String key, String defaultValue)
          Load a value from the Eclipse Preference Store.
 void remove(String key)
          Remove everything saved under this node.
static void removeErrorListener(GenericErrorHandler.StatusListener listener)
          Remove a listener from the generic error handler.
 void save(String key, String value)
          Save a key,value pair to the Eclipse Preference Store.
 void start(org.osgi.framework.BundleContext context)
          
 void stop(org.osgi.framework.BundleContext context)
          
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, 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
 

Field Detail

PLUGIN_ID

public static final String PLUGIN_ID
The plug-in id.

See Also:
Constant Field Values

VIEW_ID

public static final String VIEW_ID
the id of the view for displaying results.

See Also:
Constant Field Values

AUTO_TIMEOUT_ID

public static final String AUTO_TIMEOUT_ID
the timeout for the automation.

See Also:
Constant Field Values

AUTO_TIMEOUT_DEFAULT

public static final int AUTO_TIMEOUT_DEFAULT
the default value for the automation timeout.

See Also:
Constant Field Values
Constructor Detail

KiemAutomatedPlugin

public KiemAutomatedPlugin()
The constructor.

Method Detail

getDefault

public static KiemAutomatedPlugin getDefault()
Returns the shared instance.

Returns:
the shared instance.

getKiemExecution

public static Execution getKiemExecution()
Getter for the execution inside the KIEM.

Returns:
the execution or null

start

public void start(org.osgi.framework.BundleContext context)
           throws Exception

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

stop

public void stop(org.osgi.framework.BundleContext context)
          throws Exception

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

load

public String load(String key,
                   String defaultValue)
Load a value from the Eclipse Preference Store.

Parameters:
key - the key of the value to load
defaultValue - the default value for the property
Returns:
the value loaded value if any

remove

public void remove(String key)
Remove everything saved under this node.

Parameters:
key - the key to remove

save

public void save(String key,
                 String value)
Save a key,value pair to the Eclipse Preference Store.

Parameters:
key - the key under which to save
value - the value to save

getErrorHandler

public static GenericErrorHandler getErrorHandler()
Getter for KIELERs generic error handler.

Returns:
the error handler or null

addErrorListener

public static void addErrorListener(GenericErrorHandler.StatusListener listener)
Add a new listener to the generic error handler.

Parameters:
listener - the new listener

removeErrorListener

public static void removeErrorListener(GenericErrorHandler.StatusListener listener)
Remove a listener from the generic error handler.

Parameters:
listener - the new listener

getListeners

public static List<IAutomationListener> getListeners()
Get the list of listeners on the extension point.

Returns:
the list of listeners