org.dftproject.genesis.core
Class Activator

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

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

The Activator class controls the plug-in life cycle.


Field Summary
static java.lang.String PLUGIN_ID
          The plug-in 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
Activator()
          Creates the plug-in runtime object.
 
Method Summary
static Activator getDefault()
          Returns the singleton Activator instance.
static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String path)
          Creates and returns a new image descriptor for an image file located within the specified plug-in.
 void start(org.osgi.framework.BundleContext context)
          Called when the plug-in is activated.
protected  void startAgents()
          Activates all the agents registered with the "org.dftproject.genesis.core.agents" extension point.
 void stop(org.osgi.framework.BundleContext context)
          Called when the plug-in is deactivated.
protected  void stopAgents()
          Stops all active agents.
 
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 java.lang.String PLUGIN_ID
The plug-in ID.

See Also:
Constant Field Values
Constructor Detail

Activator

public Activator()
          throws java.lang.Exception
Creates the plug-in runtime object.

Note that instances of plug-in runtime classes are automatically created by the platform in the course of plug-in activation.

Throws:
java.lang.Exception - if this plug-in is already active
Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Called when the plug-in is activated. Initializes the database and activates all enabled agents.

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
Called when the plug-in is deactivated. Stops all active agents and performs a database shutdown.

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 Activator getDefault()
Returns the singleton Activator instance.

Returns:
the singleton instance, or null if the plug-in is not active

getImageDescriptor

public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String path)
Creates and returns a new image descriptor for an image file located within the specified plug-in.

Parameters:
path - the relative path of the image file, relative to the root of the plug-in; the path must be legal
Returns:
an image descriptor, or null if no image could be found
See Also:
AbstractUIPlugin.imageDescriptorFromPlugin(String, String)

startAgents

protected void startAgents()
Activates all the agents registered with the "org.dftproject.genesis.core.agents" extension point.


stopAgents

protected void stopAgents()
Stops all active agents.