public class ConsolePlugin extends AbstractUIPlugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
Constructor and Description |
---|
ConsolePlugin() |
Modifier and Type | Method and Description |
---|---|
static void |
errorDialog(Shell shell,
String title,
String message,
Throwable t)
Utility method with conventions
|
IConsoleManager |
getConsoleManager()
Returns the console manager.
|
static ConsolePlugin |
getDefault()
Returns the singleton instance of the console plug-in.
|
static Image |
getImage(String key)
Returns the
Image identified by the given key,
or null if it does not exist. |
static ImageDescriptor |
getImageDescriptor(String key)
Returns the
ImageDescriptor identified by the given key,
or null if it does not exist. |
static Display |
getStandardDisplay()
Returns the workbench display.
|
static String |
getUniqueIdentifier()
Convenience method which returns the unique identifier of this plug-in.
|
static void |
log(IStatus status)
Logs the specified status with this plug-in's log.
|
static void |
log(Throwable t)
Logs the specified throwable with this plug-in's log.
|
static IStatus |
newErrorStatus(String message,
Throwable exception)
Returns a new error status for this plug-in with the given message
|
void |
stop(BundleContext context)
The
AbstractUIPlugin implementation of this Plugin
method saves this plug-in's preference and dialog stores and shuts down
its image registry (if they are in use). |
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, start, startup
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
public static ConsolePlugin getDefault()
public static String getUniqueIdentifier()
public static void log(IStatus status)
status
- status to logpublic static void log(Throwable t)
t
- throwable to logpublic static IStatus newErrorStatus(String message, Throwable exception)
message
- the message to be included in the statusexception
- the exception to be included in the status or null
if nonepublic IConsoleManager getConsoleManager()
public static Display getStandardDisplay()
public static void errorDialog(Shell shell, String title, String message, Throwable t)
public static Image getImage(String key)
Image
identified by the given key,
or null
if it does not exist.Image
identified by the given key,
or null
if it does not existpublic static ImageDescriptor getImageDescriptor(String key)
ImageDescriptor
identified by the given key,
or null
if it does not exist.ImageDescriptor
identified by the given key,
or null
if it does not existpublic void stop(BundleContext context) throws Exception
AbstractUIPlugin
AbstractUIPlugin
implementation of this Plugin
method saves this plug-in's preference and dialog stores and shuts down
its image registry (if they are in use). Subclasses may extend this
method, but must send super last. A try-finally statement should
be used where necessary to ensure that super.stop()
is
always done.
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.
stop
in interface BundleActivator
stop
in class AbstractUIPlugin
context
- the bundle context for this plug-inException
- if this method fails to shut down this plug-in
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.