|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPlugin
net.refractions.udig.catalog.CatalogPlugin
public class CatalogPlugin
The main plugin class to be used in the desktop.
Field Summary | |
---|---|
static java.lang.String |
ID
|
Constructor Summary | |
---|---|
CatalogPlugin()
The constructor. |
Method Summary | |
---|---|
static void |
addListener(IResolveChangeListener listener)
Add a catalog listener for changed to this catalog. |
ICatalog[] |
getCatalogs()
|
static CatalogPlugin |
getDefault()
Returns the shared instance. |
ICatalog |
getLocalCatalog()
|
IPreferenceStore |
getPreferenceStore()
Returns the preference store for this UI plug-in. |
IResolveManager |
getResolveManager()
|
java.util.ResourceBundle |
getResourceBundle()
Returns the plugin's resource bundle, |
static java.lang.String |
getResourceString(java.lang.String key)
Returns the string from the plugin's resource bundle, or 'key' if not found. |
IServiceFactory |
getServiceFactory()
|
static boolean |
isDebugging(java.lang.String trace)
Performs the Platform.getDebugOption true check on the provided trace |
static java.net.URL |
locateURL(java.lang.Object data)
Attempts to turn data into a URL. |
static void |
log(java.lang.String message2,
java.lang.Throwable t)
Logs the Throwable in the plugin's log. |
static void |
removeListener(IResolveChangeListener listener)
Remove a catalog listener that was interested in this catalog. |
void |
restoreFromPreferences()
|
void |
start(BundleContext context)
This method is called upon plug-in activation |
void |
stop(BundleContext context)
Cleanup after shared images. |
void |
storeToPreferences(IProgressMonitor monitor)
|
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
Constructor Detail |
---|
public CatalogPlugin()
start(BundleContext)
for the initialization of the plugin.
Method Detail |
---|
public void start(BundleContext context) throws java.lang.Exception
java.lang.Exception
public void stop(BundleContext context) throws java.lang.Exception
context
-
java.lang.Exception
org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
public void restoreFromPreferences() throws BackingStoreException, java.net.MalformedURLException
BackingStoreException
java.net.MalformedURLException
public void storeToPreferences(IProgressMonitor monitor) throws BackingStoreException, java.io.IOException
BackingStoreException
java.io.IOException
public static CatalogPlugin getDefault()
public static void addListener(IResolveChangeListener listener)
listener
- public static void removeListener(IResolveChangeListener listener)
listener
- public static java.lang.String getResourceString(java.lang.String key)
public java.util.ResourceBundle getResourceBundle()
public ICatalog[] getCatalogs()
public ICatalog getLocalCatalog()
public IServiceFactory getServiceFactory()
public static java.net.URL locateURL(java.lang.Object data)
data
-
public static void log(java.lang.String message2, java.lang.Throwable t)
This will be a user visable ERROR iff:
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");
}
public static boolean isDebugging(java.lang.String trace)
Note: ProjectUIPlugin.getDefault().isDebugging() must also be on.
trace
- currently only RENDER is definedpublic IPreferenceStore getPreferenceStore()
If an error occurs reading the preference store, an empty preference store is quietly created, initialized with defaults, and returned.
NOTE: As of Eclipse 3.1 this method is no longer referring to the core runtime compatibility layer and so plug-ins relying on Plugin#initializeDefaultPreferences will have to access the compatibility layer themselves.
public IResolveManager getResolveManager()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |