PTP
Release 7.0

org.eclipse.ptp.pldt.common
Class CommonPlugin

java.lang.Object
  extended by AbstractUIPlugin
      extended by org.eclipse.ptp.pldt.common.CommonPlugin

public class CommonPlugin
extends AbstractUIPlugin

The main plugin class for PLDT (PTP's Parallel Language Development Tools)


Field Summary
static String PLUGIN_ID
           
 
Constructor Summary
CommonPlugin()
          The constructor.
 
Method Summary
static CommonPlugin getDefault()
          Returns the shared instance.
static ImageDescriptor getImageDescriptor(String path)
          Returns an image descriptor for the image file at the given plug-in relative path.
 List<String> getIncludeDirs(String includeID)
          Returns the preference setting for include paths, as a List of Strings
 ResourceBundle getResourceBundle()
          Returns the plugin's resource bundle,
static String getResourceString(String key)
          Returns the string from the plugin's resource bundle, or 'key' if not found.
static Display getStandardDisplay()
          Returns the standard display to be used.
static boolean getTraceOn()
          To use dynamic tracing (User instructions): Create a file ".options" in the same directory as your eclipse executable.
static void log(int type, String msg)
          Write to the ".log" file
static void log(String msg)
          Write to the ".log" file with default status type of IStatus.INFO
 void start(BundleContext context)
          This method is called upon plug-in activation
 void stop(BundleContext context)
          This method is called when the plug-in is stopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_ID

public static final String PLUGIN_ID
See Also:
Constant Field Values
Constructor Detail

CommonPlugin

public CommonPlugin()
The constructor.

Method Detail

getTraceOn

public static boolean getTraceOn()
To use dynamic tracing (User instructions): Create a file ".options" in the same directory as your eclipse executable. Put this in the file:
  org.eclipse.ptp.pldt.common/debug = true
  org.eclipse.ptp.pldt.common/debug/pldtTrace = true
 
Then launch eclipse in debug mode using the -debug option, and mirror the Console view output to the command line console using the -consoleLog option. (Maybe Linux already spits out the console, not sure.)
 eclipse - debug - consoleLog
 
When you run with this tracing enabled, it will print out a bunch of trace information to the console. At least MPI artifact analysis has been enabled for user-directed tracing.

Returns:

start

public void start(BundleContext context)
           throws Exception
This method is called upon plug-in activation

Throws:
Exception

stop

public void stop(BundleContext context)
          throws Exception
This method is called when the plug-in is stopped

Throws:
Exception

getDefault

public static CommonPlugin getDefault()
Returns the shared instance.


getImageDescriptor

public static ImageDescriptor getImageDescriptor(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

getStandardDisplay

public static Display getStandardDisplay()
Returns the standard display to be used. The method first checks, if the thread calling this method has an associated display. If so, this display is returned. Otherwise the method returns the default display.


getResourceBundle

public ResourceBundle getResourceBundle()
Returns the plugin's resource bundle,


getResourceString

public static String getResourceString(String key)
Returns the string from the plugin's resource bundle, or 'key' if not found.


log

public static void log(int type,
                       String msg)
Write to the ".log" file

Parameters:
type - type of log entry, e.g. IStatus.ERROR, IStatus.WARNING, etc.
msg - the message to be displayed

log

public static void log(String msg)
Write to the ".log" file with default status type of IStatus.INFO

Parameters:
msg - the message to be displayed.

getIncludeDirs

public List<String> getIncludeDirs(String includeID)
Returns the preference setting for include paths, as a List of Strings

Returns:
Since:
5.0

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.