|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractUIPlugin
net.refractions.udig.catalog.ui.CatalogUIPlugin
public class CatalogUIPlugin
Lifecycle & Resource management for RegistryUI.
The CatalogUIPlugin provides access for shared images descriptors.
Example use of a shared image descriptor:
ImageRegistry images = CatalogUIPlugin.getDefault().getImageRegistry();
ImageDescriptor image = images.getDescriptor(ISharedImages.IMG_DATASTORE_OBJ);
Field Summary | |
---|---|
static java.lang.String |
ICONS_PATH
Icons path (value "icons/") |
static java.lang.String |
ID
The id of the plug-in |
static java.lang.String |
PREF_OPEN_DIALOG_DIRECTORY
Preference store for the last directory open by the file selection dialog |
Constructor Summary | |
---|---|
CatalogUIPlugin()
The constructor. |
Method Summary | |
---|---|
static CatalogUIPlugin |
getDefault()
Returns the shared instance. |
ISharedImages |
getImages()
Images instance for use with ImageConstants. |
static ImageDescriptor |
icon(IResolve resolve)
|
static ImageDescriptor |
icon(IResolve resolve,
IProgressMonitor monitor)
Create icon for provided resource, this will block! |
static Image |
image(IResolve resolve)
Quick and dirty image generated based on ID, this image is shared and should not be disposed. |
static boolean |
isDebugging(java.lang.String trace)
Performs the Platform.getDebugOption true check on the provided trace |
static void |
log(java.lang.String message2,
java.lang.Throwable t)
Logs the Throwable in the plugin's log. |
void |
start(BundleContext context)
Set up shared images. |
void |
stop(BundleContext context)
Cleanup after shared images. |
static void |
trace(java.lang.String message)
|
static void |
trace(java.lang.String message,
java.lang.Throwable e)
Messages that only engage if getDefault().isDebugging() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ID
public static final java.lang.String PREF_OPEN_DIALOG_DIRECTORY
public static final java.lang.String ICONS_PATH
Constructor Detail |
---|
public CatalogUIPlugin()
Method Detail |
---|
public void start(BundleContext context) throws java.lang.Exception
context
-
java.lang.Exception
org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
public void stop(BundleContext context) throws java.lang.Exception
context
-
java.lang.Exception
org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
public static CatalogUIPlugin getDefault()
public ISharedImages getImages()
public static void log(java.lang.String message2, java.lang.Throwable t)
This will be a user visable ERROR iff:
message
- t
- public static void trace(java.lang.String message, java.lang.Throwable e)
It is much prefered to do this:
private static final String RENDERING = "net.refractions.udig.project/render/trace";
if (ProjectUIPlugin.getDefault().isDebugging() && "true".equalsIgnoreCase(RENDERING)) {
System.out.println("your message here");
}
message
- e
- public static void trace(java.lang.String message)
public static boolean isDebugging(java.lang.String trace)
Note: ProjectUIPlugin.getDefault().isDebugging() must also be on.
trace
- currently only RENDER is defined
public static Image image(IResolve resolve)
This method does not block and can be safely used to by a LabelProvider. This method does not make use of any information available via an info object (because that would require blocking and be unsafe).
resource
-
glyph
public static ImageDescriptor icon(IResolve resolve) throws java.io.IOException
java.io.IOException
public static ImageDescriptor icon(IResolve resolve, IProgressMonitor monitor) throws java.io.IOException
resource
-
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |