org.eclipse.gmt.umlx.registry.plugin
Class ModelRegistryPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.gmt.umlx.registry.plugin.ModelRegistryPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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

The activator class controls the plug-in life cycle


Field Summary
static java.lang.String ACCESSOR_KIND_PPID
           
static java.lang.String MODEL_CONTENT_PPID
           
static java.lang.String MODEL_SERIALIZATION_PPID
           
static java.lang.String PLUGIN_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
ModelRegistryPlugin()
          The constructor
 
Method Summary
static ModelRegistryPlugin getDefault()
          Returns the shared instance
static
<A extends Accessor>
org.eclipse.emf.common.util.URI
getURI(org.eclipse.core.resources.IResource resource, A accessor)
          Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the accessor of a (Workspace) resource.
static org.eclipse.emf.common.util.URI getURI(org.eclipse.core.resources.IResource resource, java.lang.String modelName)
          Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the modelName of a (Workspace) resource.
static void log(org.eclipse.core.runtime.IStatus status, boolean showErrorDialog)
          Returns an image descriptor for the image file at the given plug-in relative path
static void logError(java.lang.String string, java.lang.Throwable e)
           
static void logException(java.lang.Throwable e, boolean showErrorDialog)
           
static org.eclipse.core.runtime.CoreException newError(java.lang.String text, java.lang.Throwable exception)
          Return a CoreException with Error severity containing a text description and optionally wrapping a further exception.
static void showStatus(org.eclipse.core.runtime.IStatus status)
           
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUGIN_ID

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

ACCESSOR_KIND_PPID

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

MODEL_CONTENT_PPID

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

MODEL_SERIALIZATION_PPID

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

ModelRegistryPlugin

public ModelRegistryPlugin()
The constructor

Method Detail

getURI

public static <A extends Accessor> org.eclipse.emf.common.util.URI getURI(org.eclipse.core.resources.IResource resource,
                                                                          A accessor)
Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the accessor of a (Workspace) resource.

Parameters:
resource - the Workspace resource
accessor - the name and type of resource to be located.
Returns:
the Ecore URI

getURI

public static org.eclipse.emf.common.util.URI getURI(org.eclipse.core.resources.IResource resource,
                                                     java.lang.String modelName)
Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the modelName of a (Workspace) resource. This is just a convenience form of getURI(resource, new ModelNameAccessor(modelName)).

Parameters:
resource - the Workspace resource
modelName - the name of the model to be located.
Returns:
the Ecore URI

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
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
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 ModelRegistryPlugin getDefault()
Returns the shared instance

Returns:
the shared instance

log

public static void log(org.eclipse.core.runtime.IStatus status,
                       boolean showErrorDialog)
Returns an image descriptor for the image file at the given plug-in relative path

Parameters:
path - the path

logError

public static void logError(java.lang.String string,
                            java.lang.Throwable e)

logException

public static void logException(java.lang.Throwable e,
                                boolean showErrorDialog)

newError

public static org.eclipse.core.runtime.CoreException newError(java.lang.String text,
                                                              java.lang.Throwable exception)
Return a CoreException with Error severity containing a text description and optionally wrapping a further exception.

Parameters:
text - description of exception
exception - optional wrapped exception

showStatus

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