org.eclipse.ocl.examples.pivot.util
Class PivotPlugin

java.lang.Object
  extended by org.eclipse.emf.common.util.DelegatingResourceLocator
      extended by org.eclipse.emf.common.EMFPlugin
          extended by org.eclipse.ocl.examples.pivot.util.PivotPlugin
All Implemented Interfaces:
org.eclipse.emf.common.util.Logger, org.eclipse.emf.common.util.ResourceLocator

public final class PivotPlugin
extends org.eclipse.emf.common.EMFPlugin

This is the central singleton for the Pivot model plugin.

Generated

Nested Class Summary
static class PivotPlugin.Implementation
          The actual implementation of the Eclipse Plugin.
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.EMFPlugin
org.eclipse.emf.common.EMFPlugin.EclipsePlugin, org.eclipse.emf.common.EMFPlugin.InternalEclipsePlugin, org.eclipse.emf.common.EMFPlugin.InternalHelper, org.eclipse.emf.common.EMFPlugin.OSGiDelegatingBundleActivator
 
Field Summary
static java.lang.String COMPLETE_OCL_REGISTRY_PID
           
static java.lang.String COMPLETE_OCL_REGISTRY_QPID
           
static java.lang.String EMPTY_STRING
           
static PivotPlugin INSTANCE
          Keep track of the singleton.
static java.lang.String PLUGIN_ID
           
static java.lang.String STANDARD_LIBRARY_PPID
           
 
Fields inherited from class org.eclipse.emf.common.EMFPlugin
delegateResourceLocators, IS_ECLIPSE_RUNNING, IS_RESOURCES_BUNDLE_AVAILABLE
 
Fields inherited from class org.eclipse.emf.common.util.DelegatingResourceLocator
baseURL, images, resourceBundle, shouldTranslate, strings, untranslatedResourceBundle, untranslatedStrings
 
Constructor Summary
PivotPlugin()
          Create the instance.
 
Method Summary
static void catching(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Throwable throwable)
          Traces the catching of the specified throwable in the specified method of the specified class.
static void error(int code, java.lang.String message)
          Generates an error log for the specified plug-in, with the specified status code, message.
static void error(int code, java.lang.String message, java.lang.Throwable throwable)
          Generates an error log for the specified plug-in, with the specified status code, message, and throwable.
static org.eclipse.emf.ecore.resource.Resource.Factory getPivotResourceFactory()
          Obtains the best available resource factory suitable for serializing Ecore models.
static PivotPlugin.Implementation getPlugin()
          Returns the singleton instance of the Eclipse plugin.
static java.lang.String getPluginId()
           
 org.eclipse.emf.common.util.ResourceLocator getPluginResourceLocator()
          Returns the singleton instance of the Eclipse plugin.
static void info(int code, java.lang.String message)
          Generates an information log for the specified plug-in, with the specified status code, message.
static void info(int code, java.lang.String message, java.lang.Throwable throwable)
          Generates an information log for the specified plug-in, with the specified status code, message, and throwable.
static void info(java.lang.String message)
          Generates an information log for the specified plug-in, with the specified message.
static void log(int severity, int code, java.lang.String message, java.lang.Throwable throwable)
           
static boolean shouldTrace(java.lang.String option)
           
static void throwing(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Throwable throwable)
           
static void trace(java.lang.String message)
          Emits the specified message to the trace log.
static void warning(int code, java.lang.String message)
          Generates a warning log for the specified plug-in, with the specified status code, message.
static void warning(int code, java.lang.String message, java.lang.Throwable throwable)
          Generates a warning log for the specified plug-in, with the specified status code, message, and throwable.
 
Methods inherited from class org.eclipse.emf.common.EMFPlugin
getDelegateResourceLocators, getPluginLogger, getPrimaryResourceLocator, getSymbolicName, log, main
 
Methods inherited from class org.eclipse.emf.common.util.DelegatingResourceLocator
delegatedGetImage, delegatedGetString, doGetImage, doGetString, extensionFor, getBaseURL, getImage, getString, getString, getString, getString, setShouldTranslate, shouldTranslate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.util.ResourceLocator
getBaseURL, getImage, getString, getString, getString, getString
 

Field Detail

PLUGIN_ID

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

EMPTY_STRING

@NonNull
public static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

STANDARD_LIBRARY_PPID

@NonNull
public static final java.lang.String STANDARD_LIBRARY_PPID
See Also:
Constant Field Values

COMPLETE_OCL_REGISTRY_PID

@NonNull
public static final java.lang.String COMPLETE_OCL_REGISTRY_PID
See Also:
Constant Field Values

COMPLETE_OCL_REGISTRY_QPID

@NonNull
public static final java.lang.String COMPLETE_OCL_REGISTRY_QPID
See Also:
Constant Field Values

INSTANCE

@NonNull
public static final PivotPlugin INSTANCE
Keep track of the singleton.

Generated
Constructor Detail

PivotPlugin

public PivotPlugin()
Create the instance.

Generated
Method Detail

getPluginId

public static java.lang.String getPluginId()

getPluginResourceLocator

public org.eclipse.emf.common.util.ResourceLocator getPluginResourceLocator()
Returns the singleton instance of the Eclipse plugin.

Specified by:
getPluginResourceLocator in class org.eclipse.emf.common.EMFPlugin
Returns:
the singleton instance.
Generated

getPlugin

public static PivotPlugin.Implementation getPlugin()
Returns the singleton instance of the Eclipse plugin.

Returns:
the singleton instance.
Generated

getPivotResourceFactory

public static org.eclipse.emf.ecore.resource.Resource.Factory getPivotResourceFactory()
Obtains the best available resource factory suitable for serializing Ecore models.

Returns:
the best available Ecore resource factory

catching

public static void catching(java.lang.Class<?> clazz,
                            java.lang.String methodName,
                            java.lang.Throwable throwable)
Traces the catching of the specified throwable in the specified method of the specified class.

Parameters:
clazz - The class in which the throwable is being caught.
methodName - The name of the method in which the throwable is being caught.
throwable - The throwable that is being caught.

throwing

public static void throwing(java.lang.Class<?> clazz,
                            java.lang.String methodName,
                            java.lang.Throwable throwable)

shouldTrace

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

trace

public static void trace(java.lang.String message)
Emits the specified message to the trace log. It is the caller's responsibility to ensure that the appropriate tracing option is enabled.

Parameters:
message - a message
See Also:
shouldTrace(String)

error

public static void error(int code,
                         java.lang.String message)
Generates an error log for the specified plug-in, with the specified status code, message.

Parameters:
code - The status code for the log.
message - The message for the log.

error

public static void error(int code,
                         java.lang.String message,
                         java.lang.Throwable throwable)
Generates an error log for the specified plug-in, with the specified status code, message, and throwable.

Parameters:
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

info

public static void info(java.lang.String message)
Generates an information log for the specified plug-in, with the specified message. Uses OK as status code.

Parameters:
message - The message for the log.

info

public static void info(int code,
                        java.lang.String message)
Generates an information log for the specified plug-in, with the specified status code, message.

Parameters:
code - The status code for the log.
message - The message for the log.

info

public static void info(int code,
                        java.lang.String message,
                        java.lang.Throwable throwable)
Generates an information log for the specified plug-in, with the specified status code, message, and throwable.

Parameters:
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

warning

public static void warning(int code,
                           java.lang.String message)
Generates a warning log for the specified plug-in, with the specified status code, message.

Parameters:
code - The status code for the log.
message - The message for the log.

warning

public static void warning(int code,
                           java.lang.String message,
                           java.lang.Throwable throwable)
Generates a warning log for the specified plug-in, with the specified status code, message, and throwable.

Parameters:
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

log

public static void log(int severity,
                       int code,
                       java.lang.String message,
                       java.lang.Throwable throwable)