edu.cmu.sei.aadl.annex
Class AnnexPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by edu.cmu.sei.aadl.annex.AnnexPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class AnnexPlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin

The main plugin class to be used in the desktop.

Version:
$Id: AnnexPlugin.java,v 1.3 2005-12-12 21:09:29 aarong Exp $
Author:
lwrage

Field Summary
static java.lang.String PLUGIN_ID
          The ID of this plugin.
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
AnnexPlugin()
          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 AnnexPlugin getDefault()
          Returns the shared instance.
 java.util.ResourceBundle getResourceBundle()
          Returns the plugin's resource bundle,
static java.lang.String getResourceString(java.lang.String key)
          Returns the string from the plugin's resource bundle, or 'key' if not found.
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.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, 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
The ID of this plugin.

See Also:
Constant Field Values
Constructor Detail

AnnexPlugin

public AnnexPlugin()
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.ui.plugin.AbstractUIPlugin
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.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

getDefault

public static AnnexPlugin getDefault()
Returns the shared instance.


getResourceString

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


getResourceBundle

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


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.