edu.cmu.sei.osate.pluginsupport
Class PluginSupportPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by edu.cmu.sei.osate.pluginsupport.PluginSupportPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class PluginSupportPlugin
extends org.eclipse.core.runtime.Plugin

The main plugin class to be used in the desktop.

Version:
$Id: PluginSupportPlugin.java,v 1.4 2007-06-04 17:03:01 lwrage Exp $
Author:
lwrage

Field Summary
static java.lang.String AADL_CONTRIBUTION_EXTENSION_ID
           
static java.lang.String PLUGIN_ID
           
static java.lang.String PROPERTY_CONTRIBUTOR_EXTENSION_ID
           
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
PluginSupportPlugin()
          The constructor.
 
Method Summary
static org.eclipse.core.runtime.IStatus createStatus(int severity, int code, java.lang.String message, java.lang.Throwable exception)
          Create a status object representing the specified information.
static PluginSupportPlugin getDefault()
          Returns the shared instance.
static java.lang.String getPluginId()
           
static void log(int severity, int code, java.lang.String message, java.lang.Throwable exception)
          Log the specified information.
static void log(org.eclipse.core.runtime.IStatus status)
          Log the given status.
static void logError(java.lang.String message, java.lang.Throwable exception)
          Log the specified error.
static void logError(java.lang.Throwable exception)
          Log the specified error.
static void logInfo(java.lang.String message)
          Log the specified information.
static void logWarning(java.lang.String message)
          Log the specified warning.
 void start(org.osgi.framework.BundleContext context)
          This method is called upon plug-in activation
 void stop(org.osgi.framework.BundleContext context)
          This method is called when the plug-in is stopped
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUGIN_ID

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

PROPERTY_CONTRIBUTOR_EXTENSION_ID

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

AADL_CONTRIBUTION_EXTENSION_ID

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

PluginSupportPlugin

public PluginSupportPlugin()
The constructor.

Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
This method is called upon plug-in activation

Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.core.runtime.Plugin
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
This method is called when the plug-in is stopped

Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.core.runtime.Plugin
Throws:
java.lang.Exception

getDefault

public static PluginSupportPlugin getDefault()
Returns the shared instance.


getPluginId

public static java.lang.String getPluginId()

logInfo

public static void logInfo(java.lang.String message)
Log the specified information.

Parameters:
message - a log message.

logWarning

public static void logWarning(java.lang.String message)
Log the specified warning.

Parameters:
message - a log message.

logError

public static void logError(java.lang.Throwable exception)
Log the specified error.

Parameters:
exception - - an expeption.

logError

public static void logError(java.lang.String message,
                            java.lang.Throwable exception)
Log the specified error.

Parameters:
message - a message
exception - the exception

log

public static void log(int severity,
                       int code,
                       java.lang.String message,
                       java.lang.Throwable exception)
Log the specified information.

Parameters:
severity - the severity; one of the following: IStatus.OK, IStatus.ERROR,IStatus.INFO, or IStatus.WARNING.
code - the plug-in-specific status code, or OK.
message - a human-readable message, localized to the current locale.
exception - a low-level exception, or null if not applicable.

createStatus

public static org.eclipse.core.runtime.IStatus createStatus(int severity,
                                                            int code,
                                                            java.lang.String message,
                                                            java.lang.Throwable exception)
Create a status object representing the specified information.

Parameters:
severity - the severity; one of the following: IStatus.OK, IStatus.ERROR,IStatus.INFO, or IStatus.WARNING.
code - the plug-in-specific status code, or OK.
message - a human-readable message, localized to the current locale.
exception - a low-level exception, or null if not applicable.
Returns:
the status object (not null).

log

public static void log(org.eclipse.core.runtime.IStatus status)
Log the given status.

Parameters:
status - the status to log.