net.refractions.udig.location
Class LocationUIPlugin

java.lang.Object
  extended by AbstractUIPlugin
      extended by net.refractions.udig.location.LocationUIPlugin

public class LocationUIPlugin
extends AbstractUIPlugin

The main plugin class to be used in the desktop.


Field Summary
static java.lang.String ICONS_PATH
          Icons path (value "icons/")
static java.lang.String ID
           
 
Constructor Summary
LocationUIPlugin()
          The constructor.
 
Method Summary
static LocationUIPlugin getDefault()
          Returns the shared instance.
 Images getImages()
           
static boolean isDebugging(java.lang.String trace)
          Performs the Platform.getDebugOption true check on the provided trace
static void log(java.lang.String message, 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

ID

public static java.lang.String ID

ICONS_PATH

public static final java.lang.String ICONS_PATH
Icons path (value "icons/")

See Also:
Constant Field Values
Constructor Detail

LocationUIPlugin

public LocationUIPlugin()
The constructor.

Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
Set up shared images.

Parameters:
context -
Throws:
java.lang.Exception
See Also:
org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

stop

public void stop(BundleContext context)
          throws java.lang.Exception
Cleanup after shared images.

Parameters:
context -
Throws:
java.lang.Exception
See Also:
org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

getDefault

public static LocationUIPlugin getDefault()
Returns the shared instance.


getImages

public Images getImages()

log

public static void log(java.lang.String message,
                       java.lang.Throwable t)
Logs the Throwable in the plugin's log.

This will be a user visable ERROR iff:

Parameters:
message -
t -

trace

public static void trace(java.lang.String message,
                         java.lang.Throwable e)
Messages that only engage if getDefault().isDebugging()

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");
 }
 

Parameters:
message -
e -

trace

public static void trace(java.lang.String message)

isDebugging

public static boolean isDebugging(java.lang.String trace)
Performs the Platform.getDebugOption true check on the provided trace

Note: ProjectUIPlugin.getDefault().isDebugging() must also be on.

Parameters:
trace - currently only RENDER is defined
Returns:
true if -debug is on for this plugin