Package org.eclipse.mat.ui
Class MemoryAnalyserPlugin
- java.lang.Object
-
- org.eclipse.core.runtime.Plugin
-
- org.eclipse.ui.plugin.AbstractUIPlugin
-
- org.eclipse.mat.ui.MemoryAnalyserPlugin
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class MemoryAnalyserPlugin extends AbstractUIPlugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MemoryAnalyserPlugin.ISharedImages
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EDITOR_ID
static java.lang.String
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
Constructors Constructor Description MemoryAnalyserPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemoryAnalyserPlugin
getDefault()
IExtensionTracker
getExtensionTracker()
static Image
getImage(java.lang.String name)
Image
getImage(java.net.URL path)
Image
getImage(ImageDescriptor descriptor)
Image
getImage(QueryDescriptor query)
static ImageDescriptor
getImageDescriptor(java.lang.String path)
ImageDescriptor
getImageDescriptor(java.net.URL path)
ImageDescriptor
getImageDescriptor(QueryDescriptor query)
java.lang.String
getImageText(Image image)
static void
log(java.lang.Throwable e)
static void
log(java.lang.Throwable e, java.lang.String message)
static void
log(IStatus status)
static void
main(java.lang.String[] args)
void
start(org.osgi.framework.BundleContext context)
void
stop(org.osgi.framework.BundleContext context)
-
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, shutdown, startup
-
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
-
-
-
-
Field Detail
-
PLUGIN_ID
public static final java.lang.String PLUGIN_ID
- See Also:
- Constant Field Values
-
EDITOR_ID
public static final java.lang.String EDITOR_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
- Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
- Overrides:
start
in classAbstractUIPlugin
- Throws:
java.lang.Exception
-
stop
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception
- Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
- Overrides:
stop
in classAbstractUIPlugin
- Throws:
java.lang.Exception
-
getDefault
public static MemoryAnalyserPlugin getDefault()
-
getImageDescriptor
public static ImageDescriptor getImageDescriptor(java.lang.String path)
-
getImage
public static Image getImage(java.lang.String name)
-
getImage
public Image getImage(ImageDescriptor descriptor)
-
getImageDescriptor
public ImageDescriptor getImageDescriptor(java.net.URL path)
-
getImage
public Image getImage(java.net.URL path)
-
getImageDescriptor
public ImageDescriptor getImageDescriptor(QueryDescriptor query)
-
getImage
public Image getImage(QueryDescriptor query)
-
getImageText
public java.lang.String getImageText(Image image)
- Parameters:
image
- The Image for which descriptive text is to be retrieved.- Returns:
- Descriptive text for the Image object, retrieved from imageTextMap, or text indicating "unknown image" if not found.
-
getExtensionTracker
public IExtensionTracker getExtensionTracker()
-
log
public static void log(IStatus status)
-
log
public static void log(java.lang.Throwable e)
-
log
public static void log(java.lang.Throwable e, java.lang.String message)
-
main
public static void main(java.lang.String[] args)
- Parameters:
args
- Input arguments are ignored. This Java program generates a properties file "iconlabels.properties" automatically, based on the content of the MAT icons directories. The locations of the /icons directories are hardcoded to be those under org.eclipse.mat.api and org.eclipse.mat.ui, relative to the current working directory which is assumed to be a project in the workspace. This is the case if this program is "Run as Java Application" within Eclipse, using the default working directory org.eclipse.mat.ui. The output is written to "iconlabels.properties" in the current working directory, which can then be copied to the required location for the properties file, org.eclipse.mat.ui/src/org/eclipse/mat/ui/. Error handling is coarse-grained: any Exception is caught and details are printed to System.out. Some other diagnostics are written to System.out if errors occur.
-
-