org.eclipse.emf.common
Class EMFPlugin.EclipsePlugin
java.lang.Object
|
+--org.eclipse.core.runtime.Plugin
|
+--org.eclipse.emf.common.EMFPlugin.EclipsePlugin
- All Implemented Interfaces:
- Logger, ResourceLocator
- Direct Known Subclasses:
- CodeGenEcorePlugin.Implementation, CodeGenPlugin.Implementation, CommonPlugin.Implementation, EcoreEditorPlugin.Implementation, EcoreEditPlugin.Implementation, EcorePlugin.Implementation, GenModelEditPlugin.Implementation, MappingPlugin.Implementation, XMIPlugin.Implementation
- Enclosing class:
- EMFPlugin
- public abstract static class EMFPlugin.EclipsePlugin
- extends org.eclipse.core.runtime.Plugin
- implements ResourceLocator, Logger
The actual implementation of an Eclipse Plugin.
Fields inherited from class org.eclipse.core.runtime.Plugin |
PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME |
Constructor Summary |
EMFPlugin.EclipsePlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
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,
java.lang.Object[] substitutions)
Returns a string resource associated with the key, and peforms substitutions. |
void |
log(java.lang.Object logEntry)
Logs an entry. |
Methods inherited from class org.eclipse.core.runtime.Plugin |
find, find, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EMFPlugin.EclipsePlugin
public EMFPlugin.EclipsePlugin(org.eclipse.core.runtime.IPluginDescriptor descriptor)
- Creates an instance.
- Parameters:
descriptor
- the description of the plugin.
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
- Following copied from interface:
org.eclipse.emf.common.util.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
- Following copied from interface:
org.eclipse.emf.common.util.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
- Following copied from interface:
org.eclipse.emf.common.util.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,
java.lang.Object[] substitutions)
- Description copied from interface:
ResourceLocator
- Returns a string resource associated with the key, and peforms substitutions.
- Specified by:
getString
in interface ResourceLocator
- Following copied from interface:
org.eclipse.emf.common.util.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[])
log
public void log(java.lang.Object logEntry)
- Description copied from interface:
Logger
- Logs an entry.
- Specified by:
log
in interface Logger
- Following copied from interface:
org.eclipse.emf.common.util.Logger
- Parameters:
logEntry
- a plastic entry to log.