org.eclipse.emf.common.ui
Class EclipseUIPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.eclipse.emf.common.ui.EclipseUIPlugin
All Implemented Interfaces:
EMFPlugin.InternalEclipsePlugin, Logger, ResourceLocator, org.osgi.framework.BundleActivator
Direct Known Subclasses:
CommonUIPlugin.Implementation, Ecore2EcoreEditorPlugin.Implementation, Ecore2XMLUIPlugin.Implementation, EcoreEditorPlugin.Implementation, EMFEditUIPlugin.Implementation, GenModelEditPlugin.Implementation

public abstract class EclipseUIPlugin
extends AbstractUIPlugin
implements ResourceLocator, Logger, EMFPlugin.InternalEclipsePlugin

An Eclipse AbstractUIPlugin implementation base to be used within UI plug-ins.

Since:
2.2.0

Field Summary
protected  EMFPlugin.InternalHelper helper
          The EMF plug-in APIs are all delegated to this helper, so that code can be shared by plug-in implementations with a different platform base class (e.g.
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
EclipseUIPlugin()
          Creates an instance.
 
Method Summary
protected  java.lang.Object doGetImage(java.lang.String key)
          Does the work of fetching the image associated with the key.
 java.net.URL getBaseURL()
          Returns the URL from which all resources are based.
 java.lang.Object getImage(java.lang.String key)
          Returns the description that can be used to create the image resource associated with the key.
 java.lang.String getString(java.lang.String key)
          Returns the string resource associated with the key.
 java.lang.String getString(java.lang.String key, boolean translate)
          Returns the string resource associated with the key.
 java.lang.String getString(java.lang.String key, java.lang.Object[] substitutions)
          Returns a string resource associated with the key, and performs substitutions.
 java.lang.String getString(java.lang.String key, java.lang.Object[] substitutions, boolean translate)
          Returns a string resource associated with the key, and performs substitutions.
 java.lang.String getSymbolicName()
          Return the plugin ID.
 void log(java.lang.Object logEntry)
          Logs an entry.
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, start, startup, stop
 
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

helper

protected EMFPlugin.InternalHelper helper
The EMF plug-in APIs are all delegated to this helper, so that code can be shared by plug-in implementations with a different platform base class (e.g. Plugin).

Constructor Detail

EclipseUIPlugin

public EclipseUIPlugin()
Creates an instance.

Method Detail

getSymbolicName

public java.lang.String getSymbolicName()
Return the plugin ID.

Specified by:
getSymbolicName in interface EMFPlugin.InternalEclipsePlugin

getBaseURL

public java.net.URL getBaseURL()
Description copied from interface: ResourceLocator
Returns the URL from which all resources are based.

Specified by:
getBaseURL in interface ResourceLocator
Returns:
the URL from which all resources are based.

getImage

public java.lang.Object getImage(java.lang.String key)
Description copied from interface: ResourceLocator
Returns the description that can be used to create the image resource associated with the key. The description will typically be in the form of a URL to the image data. Creation of an actual image depends on the GUI environment; within Eclipse, org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry can be used.

Specified by:
getImage in interface ResourceLocator
Parameters:
key - the key of the image resource.
Returns:
the description on the image resource.

doGetImage

protected java.lang.Object doGetImage(java.lang.String key)
                               throws java.io.IOException
Does the work of fetching the image associated with the key. It ensures that the image exists.

Parameters:
key - the key of the image to fetch.
Returns:
the description of the image associated with the key.
Throws:
java.io.IOException - if an image doesn't exist.

getString

public java.lang.String getString(java.lang.String key)
Description copied from interface: ResourceLocator
Returns the string resource associated with the key.

Specified by:
getString in interface ResourceLocator
Parameters:
key - the key of the string resource.
Returns:
the string resource associated with the key.

getString

public java.lang.String getString(java.lang.String key,
                                  boolean translate)
Description copied from interface: ResourceLocator
Returns the string resource associated with the key.

Specified by:
getString in interface ResourceLocator
Parameters:
key - the key of the string resource.
translate - whether the result is to be translated to the current locale.
Returns:
the string resource associated with the key.

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object[] substitutions)
Description copied from interface: ResourceLocator
Returns a string resource associated with the key, and performs substitutions.

Specified by:
getString in interface ResourceLocator
Parameters:
key - the key of the string.
substitutions - the message substitutions.
Returns:
a string resource associated with the key.
See Also:
ResourceLocator.getString(String), MessageFormat.format(String, Object[])

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object[] substitutions,
                                  boolean translate)
Description copied from interface: ResourceLocator
Returns a string resource associated with the key, and performs substitutions.

Specified by:
getString in interface ResourceLocator
Parameters:
key - the key of the string.
substitutions - the message substitutions.
translate - whether the result is to be translated to the current locale.
Returns:
a string resource associated with the key.
See Also:
ResourceLocator.getString(String), MessageFormat.format(String, Object[])

log

public void log(java.lang.Object logEntry)
Description copied from interface: Logger
Logs an entry.

Specified by:
log in interface Logger
Parameters:
logEntry - a plastic entry to log.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.