edu.cmu.sei.osate.core
Class OsateCorePlugin

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

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

The main plugin class to be used in the desktop.


Field Summary
static java.lang.String copyright
           
static java.lang.String PLUGIN_ID
          ID of the AADL core plugin (value "edu.cmu.sei.osate.core")
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
OsateCorePlugin()
          The constructor.
 
Method Summary
static IAadlProject create(org.eclipse.core.resources.IProject project)
          Returns the AADL project corresponding to the given project.
static OsateCorePlugin getDefault()
          Returns the shared instance.
static java.lang.String getFormattedMessage(java.lang.String key, java.lang.String arg)
           
static java.lang.String getFormattedMessage(java.lang.String key, java.lang.String[] args)
           
static org.eclipse.core.runtime.IPath getInstallLocation()
           
static java.net.URL getInstallURL()
           
static java.lang.String getMessage(java.lang.String key)
           
static java.lang.String getPluginId()
           
 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 org.eclipse.core.resources.IWorkspace getWorkspace()
           
static boolean isDebug()
           
static boolean isDebug(java.lang.String option)
           
static void log(org.eclipse.core.runtime.IStatus status)
           
static void log(java.lang.Throwable t)
           
static void logErrorMessage(java.lang.String message)
           
static void logErrorStatus(java.lang.String message, org.eclipse.core.runtime.IStatus status)
           
 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

copyright

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

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
ID of the AADL core plugin (value "edu.cmu.sei.osate.core")

See Also:
Constant Field Values
Constructor Detail

OsateCorePlugin

public OsateCorePlugin()
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

create

public static IAadlProject create(org.eclipse.core.resources.IProject project)
Returns the AADL project corresponding to the given project.

Note that no check is done at this time on the existence or the AADL nature of this project.

Parameters:
project - the given project
Returns:
the AADL project corresponding to the given project, null if the given project is null

getDefault

public static OsateCorePlugin 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,


getWorkspace

public static org.eclipse.core.resources.IWorkspace getWorkspace()

getPluginId

public static java.lang.String getPluginId()

getInstallLocation

public static org.eclipse.core.runtime.IPath getInstallLocation()

getInstallURL

public static java.net.URL getInstallURL()

log

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

log

public static void log(java.lang.Throwable t)

logErrorMessage

public static void logErrorMessage(java.lang.String message)

logErrorStatus

public static void logErrorStatus(java.lang.String message,
                                  org.eclipse.core.runtime.IStatus status)

isDebug

public static boolean isDebug()

isDebug

public static boolean isDebug(java.lang.String option)

getMessage

public static java.lang.String getMessage(java.lang.String key)

getFormattedMessage

public static java.lang.String getFormattedMessage(java.lang.String key,
                                                   java.lang.String arg)

getFormattedMessage

public static java.lang.String getFormattedMessage(java.lang.String key,
                                                   java.lang.String[] args)