Class Activator
- java.lang.Object
-
- org.eclipse.core.runtime.Plugin
-
- org.eclipse.ui.plugin.AbstractUIPlugin
-
- net.ssehub.easy.producer.ui.internal.Activator
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class Activator extends org.eclipse.ui.plugin.AbstractUIPluginThe activator class controls the plug-in life cycle.
-
-
Constructor Summary
Constructors Constructor Description Activator()The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ActivatorgetDefault()Returns the shared instance.static org.eclipse.swt.graphics.ImagegetImage(java.lang.String path)Get icon by path.static org.eclipse.jface.resource.ImageDescriptorgetImageDescriptor(java.lang.String path)Returns an image descriptor for the image file at the given plug-in relative path.static EASyLoggerFactory.EASyLoggergetLogger(java.lang.Class<?> cls)Returns the EASy logger for the specified class.static java.lang.StringgetVersion()Returns the version of the specified bundle as specified in its manifest.voidstart(org.osgi.framework.BundleContext context)TheAbstractUIPluginimplementation of thisPluginmethod refreshes the plug-in actions.
This instance is created.voidstop(org.osgi.framework.BundleContext context)TheAbstractUIPluginimplementation of thisPluginmethod saves this plug-in's preference and dialog stores and shuts down its image registry (if they are in use).-
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
-
-
-
-
Field Detail
-
PLUGIN_ID
public static final java.lang.String PLUGIN_ID
The plug-in ID.- See Also:
- Constant Field Values
-
PRE
public static final java.lang.String PRE
- See Also:
- Constant Field Values
-
ERROR
public static final java.lang.String ERROR
- See Also:
- Constant Field Values
-
WARNING
public static final java.lang.String WARNING
- See Also:
- Constant Field Values
-
LOGO
public static final java.lang.String LOGO
- See Also:
- Constant Field Values
-
plugin
private static Activator plugin
The shared instance.
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext context) throws java.lang.ExceptionTheAbstractUIPluginimplementation of thisPluginmethod refreshes the plug-in actions.
This instance is created.- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Overrides:
startin classorg.eclipse.ui.plugin.AbstractUIPlugin- Parameters:
context- the bundle context for this plug-in- Throws:
java.lang.Exception- if this plug-in did not start up properly
-
stop
public void stop(org.osgi.framework.BundleContext context) throws java.lang.ExceptionTheAbstractUIPluginimplementation of thisPluginmethod saves this plug-in's preference and dialog stores and shuts down its image registry (if they are in use).- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Overrides:
stopin classorg.eclipse.ui.plugin.AbstractUIPlugin- Parameters:
context- the bundle context for this plug-in- Throws:
java.lang.Exception- if this plug-in did not start up properly
-
getDefault
public static Activator getDefault()
Returns the shared instance.- Returns:
- the shared instance
-
getImageDescriptor
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String path)
Returns an image descriptor for the image file at the given plug-in relative path.- Parameters:
path- the path of the image inside this plug-in.- Returns:
- the image descriptor
-
getImage
public static org.eclipse.swt.graphics.Image getImage(java.lang.String path)
Get icon by path.- Parameters:
path- the path to the image/icon- Returns:
- the image/icon
-
getLogger
public static EASyLoggerFactory.EASyLogger getLogger(java.lang.Class<?> cls)
Returns the EASy logger for the specified class.- Parameters:
cls- the class to return the logger for- Returns:
- the logger
-
getVersion
public static java.lang.String getVersion()
Returns the version of the specified bundle as specified in its manifest.- Returns:
- The version in the following format: <number>.<number>.<number>
-
-