org.eclipse.emf.ocl.internal
Class OCLPlugin

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

public class OCLPlugin
extends EMFPlugin

The main plugin class to be used in the desktop.


Nested Class Summary
static class OCLPlugin.Implementation
          The definition of the Eclipse plug-in flavour of this EMF plug-in.
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.EMFPlugin
EMFPlugin.EclipsePlugin, EMFPlugin.InternalEclipsePlugin, EMFPlugin.InternalHelper
 
Field Summary
static String EMPTY_STRING
           
 
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
OCLPlugin()
          The constructor.
 
Method Summary
static void catching(Class clazz, String methodName, Throwable throwable)
          Traces the catching of the specified throwable in the specified method of the specified class.
static void error(int code, String message)
          Generates an error log for the specified plug-in, with the specified status code, message.
static void error(int code, String message, Throwable throwable)
          Generates an error log for the specified plug-in, with the specified status code, message, and throwable.
static OCLPlugin getInstance()
          Returns the shared instance.
static OCLPlugin.Implementation getPlugin()
          Obtains the Eclipse plug-in that I implement.
static String getPluginId()
           
 ResourceLocator getPluginResourceLocator()
           
static void info(int code, String message)
          Generates an information log for the specified plug-in, with the specified status code, message.
static void info(int code, String message, Throwable throwable)
          Generates an information log for the specified plug-in, with the specified status code, message, and throwable.
static void info(String message)
          Generates an information log for the specified plug-in, with the specified message.
static void log(int severity, int code, String message, Throwable throwable)
           
static boolean shouldTrace(String option)
           
static void throwing(Class clazz, String methodName, Throwable throwable)
           
static void warning(int code, String message)
          Generates a warning log for the specified plug-in, with the specified status code, message.
static void warning(int code, String message, 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

EMPTY_STRING

public static final String EMPTY_STRING
See Also:
Constant Field Values
Constructor Detail

OCLPlugin

public OCLPlugin()
The constructor.

Method Detail

getPluginId

public static String getPluginId()

getPluginResourceLocator

public ResourceLocator getPluginResourceLocator()
Specified by:
getPluginResourceLocator in class EMFPlugin

getPlugin

public static OCLPlugin.Implementation getPlugin()
Obtains the Eclipse plug-in that I implement.

Returns:
my Eclipse plug-in self

getInstance

public static OCLPlugin getInstance()
Returns the shared instance.


catching

public static void catching(Class clazz,
                            String methodName,
                            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(Class clazz,
                            String methodName,
                            Throwable throwable)

shouldTrace

public static boolean shouldTrace(String option)

error

public static void error(int code,
                         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,
                         String message,
                         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(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,
                        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,
                        String message,
                        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,
                           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,
                           String message,
                           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,
                       String message,
                       Throwable throwable)

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.