net.refractions.udig.tool.info
Class InfoPlugin

java.lang.Object
  extended by AbstractUIPlugin
      extended by net.refractions.udig.tool.info.InfoPlugin

public class InfoPlugin
extends AbstractUIPlugin

Plugin for UDIG Information facilities.

Information services is provided by:

Programatic access to the current information is not currently provided as part of the public API. If you are interested in this please let us know and it can be moved over.


Field Summary
static java.lang.String ID
           
 
Constructor Summary
InfoPlugin()
          The constructor.
 
Method Summary
static InfoPlugin getDefault()
          Access shared InfoPlugin instance.
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 e)
          Writes an info log in the plugin's log.
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
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
Constructor Detail

InfoPlugin

public InfoPlugin()
The constructor.

Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop(BundleContext context)
          throws java.lang.Exception
Throws:
java.lang.Exception

getDefault

public static InfoPlugin getDefault()
Access shared InfoPlugin instance.

Returns:
Shared Instance

log

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

This should be used for user level messages.


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


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.

  • Trace.RENDER - trace rendering progress

Parameters:
trace - currently only RENDER is defined