de.cau.cs.kieler.klots
Class KlotsPlugin

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

public class KlotsPlugin
extends AbstractUIPlugin

Rating red

Field Summary
static String PLUGIN_ID
          The Constant 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
KlotsPlugin()
          The constructor of the ABRO plug-in.
 
Method Summary
static ColorProvider getColorProvider()
           
static KlotsPlugin getDefault()
          Returns the shared instance of this plug-in.
static String getKlotsEditorID()
           
static SJInstructionsView getSJInstructionsView()
           
 void showError(String textMessage, String pluginID, Exception exception, boolean silent)
          Shows an error dialog using the StatusAdapter.
 void showWarning(String textMessage, String pluginID, Exception exception, boolean silent)
          Shows a warning dialog using the StatusAdapter.
 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 Constant PLUGIN_ID.

See Also:
Constant Field Values
Constructor Detail

KlotsPlugin

public KlotsPlugin()
The constructor of the ABRO plug-in.

Method Detail

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

getDefault

public static KlotsPlugin getDefault()
Returns the shared instance of this plug-in.

Returns:
the shared instance

getColorProvider

public static ColorProvider getColorProvider()
Returns:
ColorProvider the color provider.

getSJInstructionsView

public static SJInstructionsView getSJInstructionsView()
Returns:
SJInstructionsView the SJ instructions view instance.

getKlotsEditorID

public static String getKlotsEditorID()
Returns:
String the KLOTS editor ID.

showWarning

public void showWarning(String textMessage,
                        String pluginID,
                        Exception exception,
                        boolean silent)
Shows a warning dialog using the StatusAdapter. This dialog will *NOT* be modal, so that the user is notified but the current work is not interrupted.
Additionally the information will be logged in the error log so that the user has the opportunity to e.g., access the error stack trace. The plug-in id is required, textMessage and exception are optional.

Parameters:
textMessage - the text message
pluginID - the plug-in id
exception - the exception
silent - the silent tag indicates that only logging occurs, no message dialog is displayed

showError

public void showError(String textMessage,
                      String pluginID,
                      Exception exception,
                      boolean silent)
Shows an error dialog using the StatusAdapter. This dialog will be modal, so that the user has to click OK to end it. Additionally the information will be logged in the error log so that the user has the opportunity to e.g., access the error stack trace. The plug-in id is required, textMessage and exception are optional.

Parameters:
textMessage - the optional text message
pluginID - the plug-in id
exception - the exception if any, null otherwise
silent - the silent tag indicates that only logging occurs, no message dialog is displayed