public class Activator extends AbstractUIPlugin
Modifier and Type | Field and Description |
---|---|
static String |
COMPLETE_IMAGE_ID |
static String |
FORBIDDEN_IMAGE_ID |
static String |
LOADING_IMAGE_ID |
static String |
PLUGIN_ID |
static String |
RESTRICTED_IMAGE_ID |
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
Constructor and Description |
---|
Activator()
The constructor
|
Modifier and Type | Method and Description |
---|---|
static Activator |
getDefault()
Returns the shared instance
|
static void |
handleError(PartInitException e,
String string,
IFile file) |
static IStatus |
handleError(Throwable cause,
String message,
Object... args)
Cares for the given error.
|
static IStatus |
handleProblem(int severity,
String message,
Throwable cause)
Handles a problem by writing it to the log file and maybe showing a
dialog.
|
static IStatus |
handleProblem(int severity,
Throwable cause,
String message,
Object... args)
Cares for the given problem.
|
IStatus |
handleProblem(Throwable e) |
protected void |
initializeImageRegistry(ImageRegistry registry) |
void |
start(org.osgi.framework.BundleContext context) |
void |
stop(org.osgi.framework.BundleContext context) |
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
public static final String PLUGIN_ID
public static final String COMPLETE_IMAGE_ID
public static final String LOADING_IMAGE_ID
public static final String RESTRICTED_IMAGE_ID
public static final String FORBIDDEN_IMAGE_ID
public void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
start
in class AbstractUIPlugin
Exception
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
stop
in class AbstractUIPlugin
Exception
public static Activator getDefault()
public static IStatus handleProblem(int severity, String message, Throwable cause)
severity
- one of IStatus.ERROR
, IStatus#WARNING,
IStatus#INFO, IStatus#OK
message
- the message to log or null
cause
- the exception that caused the problem or null
.public static void handleError(PartInitException e, String string, IFile file)
public static IStatus handleError(Throwable cause, String message, Object... args)
NLS.bind(String, Object[])
and the complete
argument list to handleProblem(int, String, Throwable)
.cause
- The exception that caused the problem (or null)message
- The message, use {0}, {1} ... for argumentsargs
- Exactly as many arguments as referenced in the messageIStatus
object created while handling the errorpublic static IStatus handleProblem(int severity, Throwable cause, String message, Object... args)
NLS.bind(String, Object[])
and the
complete argument list to handleProblem(int, String, Throwable)
.severity
- One of the severity constants defined in IStatus
.
Currently, IStatus.ERROR will pop up an error dialogue.cause
- The exception that caused the problem (or null)message
- The message, use {0}, {1} ... for argumentsargs
- Exactly as many arguments as referenced in the messageIStatus
object created while handling the errorprotected void initializeImageRegistry(ImageRegistry registry)
initializeImageRegistry
in class AbstractUIPlugin