org.eclipse.xtext.ui.shared.internal
Class Activator

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.xtext.ui.shared.internal.Activator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class Activator
extends org.eclipse.core.runtime.Plugin


Field Summary
static java.lang.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
Activator()
           
 
Method Summary
static Activator getDefault()
           
 com.google.inject.Injector getInjector()
           
protected  void initializeInjector()
           
protected  boolean isJavaEnabled()
           
protected  void registerListeners()
           
 void start(org.osgi.framework.BundleContext context)
          Starts up this plug-in.
 void stop(org.osgi.framework.BundleContext context)
          Stops this plug-in.
protected  void unregisterListeners()
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, 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
See Also:
Constant Field Values
Constructor Detail

Activator

public Activator()
Method Detail

getDefault

public static Activator getDefault()

getInjector

public com.google.inject.Injector getInjector()

initializeInjector

protected void initializeInjector()

isJavaEnabled

protected boolean isJavaEnabled()

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Description copied from class: org.eclipse.core.runtime.Plugin
Starts up this plug-in.

This method should be overridden in subclasses that need to do something when this plug-in is started. Implementors should call the inherited method at the first possible point to ensure that any system requirements can be met.

If this method throws an exception, it is taken as an indication that plug-in initialization has failed; as a result, the plug-in will not be activated; moreover, the plug-in will be marked as disabled and ineligible for activation for the duration.

Note 1: This method is automatically invoked by the platform the first time any code in the plug-in is executed.

Note 2: This method is intended to perform simple initialization of the plug-in environment. The platform may terminate initializers that do not complete in a timely fashion.

Note 3: The class loader typically has monitors acquired during invocation of this method. It is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms, as this would lead to deadlock vulnerability.

Note 4: The supplied bundle context represents the plug-in to the OSGi framework. For security reasons, it is strongly recommended that this object should not be divulged.

Note 5: This method and the Plugin.stop(BundleContext) may be called from separate threads, but the OSGi framework ensures that both methods will not be called simultaneously.

Clients must never explicitly call this method.

Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.core.runtime.Plugin
Parameters:
context - the bundle context for this plug-in
Throws:
java.lang.Exception - if this plug-in did not start up properly

registerListeners

protected void registerListeners()

unregisterListeners

protected void unregisterListeners()

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Description copied from class: org.eclipse.core.runtime.Plugin
Stops this plug-in.

This method should be re-implemented in subclasses that need to do something when the plug-in is shut down. Implementors should call the inherited method as late as possible to ensure that any system requirements can be met.

Plug-in shutdown code should be robust. In particular, this method should always make an effort to shut down the plug-in. Furthermore, the code should not assume that the plug-in was started successfully.

Note 1: If a plug-in has been automatically started, this method will be automatically invoked by the platform when the platform is shut down.

Note 2: This method is intended to perform simple termination of the plug-in environment. The platform may terminate invocations that do not complete in a timely fashion.

Note 3: The supplied bundle context represents the plug-in to the OSGi framework. For security reasons, it is strongly recommended that this object should not be divulged.

Note 4: This method and the Plugin.start(BundleContext) may be called from separate threads, but the OSGi framework ensures that both methods will not be called simultaneously.

Clients must never explicitly call this method.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.core.runtime.Plugin
Parameters:
context - the bundle context for this plug-in
Throws:
java.lang.Exception - if this method fails to shut down this plug-in