net.refractions.udig.tools.edit
Class EditPlugin

java.lang.Object
  extended by AbstractUIPlugin
      extended by net.refractions.udig.tools.edit.EditPlugin

public class EditPlugin
extends AbstractUIPlugin

The main plugin class to be used in the desktop.


Field Summary
static java.lang.String ACTIVATOR
           
static java.lang.String BEHAVIOUR
           
static java.lang.String HANDLER_LOCK
           
static java.lang.String ID
           
static java.lang.String RUN_ASSERTIONS
           
static java.lang.String SELECTION
           
 
Constructor Summary
EditPlugin()
          The constructor.
 
Method Summary
static EditPlugin getDefault()
          Returns the shared instance.
static ImageDescriptor getImageDescriptor(java.lang.String path)
          Returns an image descriptor for the image file at the given plug-in relative path.
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 e)
          Writes an info log in the plugin's log.
 void start(BundleContext context)
           
 void stop(BundleContext context)
          This method is called when the plug-in is stopped
static void trace(java.lang.String traceID, java.lang.String message, java.lang.Throwable e)
          Messages that only engage if getDefault().isDebugging() and the trace option traceID is true.
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 final java.lang.String ID
See Also:
Constant Field Values

SELECTION

public static final java.lang.String SELECTION
See Also:
Constant Field Values

ACTIVATOR

public static final java.lang.String ACTIVATOR
See Also:
Constant Field Values

HANDLER_LOCK

public static final java.lang.String HANDLER_LOCK
See Also:
Constant Field Values

BEHAVIOUR

public static final java.lang.String BEHAVIOUR
See Also:
Constant Field Values

RUN_ASSERTIONS

public static final java.lang.String RUN_ASSERTIONS
See Also:
Constant Field Values
Constructor Detail

EditPlugin

public EditPlugin()
The constructor.

Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
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
This method is called when the plug-in is stopped

Throws:
java.lang.Exception

getDefault

public static EditPlugin getDefault()
Returns the shared instance.


getImageDescriptor

public static ImageDescriptor getImageDescriptor(java.lang.String path)
Returns an image descriptor for the image file at the given plug-in relative path.

Parameters:
path - the path
Returns:
the image descriptor

log

public static void log(java.lang.String message2,
                       java.lang.Throwable e)
Writes an info log in the plugin's log.

This should be used for user level messages.

Parameters:
message -
e -

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


trace

public static void trace(java.lang.String traceID,
                         java.lang.String message,
                         java.lang.Throwable e)
Messages that only engage if getDefault().isDebugging() and the trace option traceID is true. Available trace options can be found in the Trace class. (They must also be part of the .options file) if( ProjectUIPlugin.getDefault().isDebugging() && "true".equalsIgnoreCase( RENDERING ) ){ System.out.println( "your message here" );


isDebugging

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

Returns:
true if this plugig is in your .options file