EGF Engine
Release 0.1.0

org.eclipse.egf.common.ui.activator
Class AbstractUIActivator

java.lang.Object
  extended by AbstractUIPlugin
      extended by org.eclipse.egf.common.ui.activator.AbstractUIActivator
Direct Known Subclasses:
EgfApplicationActivator, EgfPdeActivator, EgfUiActivator, EgfWorkbenchActivator, MappingEditorActivator, PatternUiActivator

public abstract class AbstractUIActivator
extends AbstractUIPlugin

Base class for plug-ins that integrate with the Eclipse platform UI.


Constructor Summary
AbstractUIActivator()
           
 
Method Summary
protected  ImageDescriptor createImageDescriptor(String key_p)
          Create an image descriptor for given key.
 Image getImage(String key_p)
          Get an image for given key.
 ImageDescriptor getImageDescriptor(String key_p)
          Get an image descriptor for given key.
 String getPluginID()
          Get the plug-in ID according to MANIFEST.MF definition.
static Display getWorkbenchDisplay()
          Returns the workbench display to be used.
 void log(Class<?> clazz, String methodName, Throwable t)
          Logs the given throwable to the platform log, indicating the class and method from where it is being logged (this is not necessarily where it occurred).
 void log(int severity, String message, Throwable e)
          Log the given exception along with the provided message and severity indicator
 void log(IStatus status)
          Logs the given message and status to the platform log.
 void log(String message)
          Logs the given message to the platform log.
 void log(String message, IStatus status)
          Logs the given message and status to the platform log.
 void log(String message, Throwable t)
          Logs the given message and throwable to the platform log.
 void log(Throwable t)
           
 IStatus newErrorStatus(String message, Throwable exception)
          Returns a new error status for this plug-in with the given message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUIActivator

public AbstractUIActivator()
Method Detail

getWorkbenchDisplay

public static Display getWorkbenchDisplay()
Returns the workbench display to be used.


log

public void log(Throwable t)

newErrorStatus

public IStatus newErrorStatus(String message,
                              Throwable exception)
Returns a new error status for this plug-in with the given message

Parameters:
message - the message to be included in the status
exception - the exception to be included in the status or null if none
Returns:
a new error status

log

public void log(String message)
Logs the given message to the platform log. If you have an exception in hand, call log(String, Throwable) instead. If you have a status object in hand call log(String, IStatus) instead.

Parameters:
message - A high level UI message describing when the problem happened.

log

public void log(String message,
                Throwable t)
Logs the given message and throwable to the platform log. If you have a status object in hand call log(String, IStatus) instead.

Parameters:
message - A high level UI message describing when the problem happened.
t - The throwable from where the problem actually occurred.

log

public void log(Class<?> clazz,
                String methodName,
                Throwable t)
Logs the given throwable to the platform log, indicating the class and method from where it is being logged (this is not necessarily where it occurred).

Parameters:
clazz - The calling class.
methodName - The calling method name.
t - The throwable from where the problem actually occurred.

log

public void log(IStatus status)
Logs the given message and status to the platform log.

Parameters:
status - The status describing the problem. Must not be null.

log

public void log(int severity,
                String message,
                Throwable e)
Log the given exception along with the provided message and severity indicator


log

public void log(String message,
                IStatus status)
Logs the given message and status to the platform log.

Parameters:
message - A high level UI message describing when the problem happened. May be null.
status - The status describing the problem. Must not be null.

getImageDescriptor

public ImageDescriptor getImageDescriptor(String key_p)
Get an image descriptor for given key.
Images must be located in 'plug-in folder'/icons

Parameters:
key_p - the key must be the file name of the related image.
Returns:
an ImageDescriptor or null if not found

getImage

public Image getImage(String key_p)
Get an image for given key.
Images must be located in 'plug-in folder'/icons

Parameters:
key_p - the key must be the file name of the related image.
Returns:
an Image or null if not found

createImageDescriptor

protected ImageDescriptor createImageDescriptor(String key_p)
Create an image descriptor for given key.
Images must be located in 'plug-in folder'/icons

Parameters:
key_p - the key must be the file name of the related image.
Returns:
an ImageDescriptor or null if error occurred

getPluginID

public String getPluginID()
Get the plug-in ID according to MANIFEST.MF definition.

Returns:
a String containing the plug-in ID.

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.