public class CommonPlugin
extends AbstractUIPlugin
Constructor and Description |
---|
CommonPlugin()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static CommonPlugin |
getDefault()
Returns the shared instance.
|
static ImageDescriptor |
getImageDescriptor(String path)
Returns an image descriptor for the image file at the given plug-in
relative path.
|
List<String> |
getIncludeDirs(String includeID)
Returns the preference setting for include paths, as a List of Strings
|
ResourceBundle |
getResourceBundle()
Returns the plugin's resource bundle,
|
static String |
getResourceString(String key)
Returns the string from the plugin's resource bundle, or 'key' if not
found.
|
static Display |
getStandardDisplay()
Returns the standard display to be used.
|
static boolean |
getTraceOn()
To use dynamic tracing (User instructions): Create a file ".options" in
the same directory as your eclipse executable.
|
static void |
log(int type,
String msg)
Write to the ".log" file
|
static void |
log(String msg)
Write to the ".log" file with default status type of IStatus.INFO
|
void |
start(BundleContext context)
This method is called upon plug-in activation
|
void |
stop(BundleContext context)
This method is called when the plug-in is stopped
|
public static final String PLUGIN_ID
public static boolean getTraceOn()
org.eclipse.ptp.pldt.common/debug = true org.eclipse.ptp.pldt.common/debug/pldtTrace = trueThen launch eclipse in debug mode using the -debug option, and mirror the Console view output to the command line console using the -consoleLog option. (Maybe Linux already spits out the console, not sure.)
eclipse - debug - consoleLogWhen you run with this tracing enabled, it will print out a bunch of trace information to the console. At least MPI artifact analysis has been enabled for user-directed tracing.
public void start(BundleContext context) throws Exception
Exception
public void stop(BundleContext context) throws Exception
Exception
public static CommonPlugin getDefault()
public static ImageDescriptor getImageDescriptor(String path)
path
- the pathpublic static Display getStandardDisplay()
public ResourceBundle getResourceBundle()
public static String getResourceString(String key)
public static void log(int type, String msg)
type
- type of log entry, e.g. IStatus.ERROR, IStatus.WARNING, etc.msg
- the message to be displayedpublic static void log(String msg)
msg
- the message to be displayed.Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.