|
|||||||||
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 MutablePicoContainer |
getContainer()
Gets the container for catalog ui. |
static MutablePicoContainer |
getContainer(IResolve handle)
Gets a container associated with this handle. |
static CatalogUIPlugin |
getDefault()
Returns the shared instance. |
ImageRegistry |
getImageRegistry()
|
ISharedImages |
getImages()
Images instance for use with ImageConstants. |
static boolean |
hasCachedTitle(IResolve resolve)
Returns true if the title to the resolve was cached during a previous run. |
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 java.lang.String |
label(IResolve resource)
Quick and dirty label generation based on ID. |
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 |
storeLabel(IResolve element,
java.lang.String text)
|
static java.lang.String |
title(IResolve resource)
Retrive title, this is based on associated metadata (aka LayerPointInfo object). |
static java.lang.String |
title(IResolve resource,
IProgressMonitor monitor)
Retrieve title, this is based on associated metadata (aka LayerPointInfo object). |
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 ImageRegistry getImageRegistry()
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 MutablePicoContainer getContainer()
This is used by the IResourceLabel decorator to pass titles, and images between threads.
public static MutablePicoContainer getContainer(IResolve handle)
As with any container, the contents should not be assumned, etc...
handle
-
public static java.lang.String label(IResolve resource)
This method does not block and can be safely used to by a LabelProvider. This method does not make use of any title information available via an info object (because that would require blocking and be unsafe).
title
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
public static java.lang.String title(IResolve resource, IProgressMonitor monitor) throws java.io.IOException
This method is *not* suitable for use with a LabelProvider, only a LabelDecorator that works in its own thread.
java.io.IOException
public static java.lang.String title(IResolve resource) throws java.io.IOException
This method is *not* suitable for use with a LabelProvider, only a LabelDecorator that works in its own thread.
java.io.IOException
public static boolean hasCachedTitle(IResolve resolve)
label(IResolve)
will have returned
the cached title.
resolve
- the resolve to check for a title.
public static void storeLabel(IResolve element, java.lang.String text) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |