org.eclipse.emf.common
Class EMFPlugin.EclipsePlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.emf.common.EMFPlugin.EclipsePlugin
All Implemented Interfaces:
EMFPlugin.InternalEclipsePlugin, Logger, ResourceLocator, org.osgi.framework.BundleActivator
Direct Known Subclasses:
ChangeEditPlugin.Implementation, ChangePlugin.Implementation, CodeGenEcorePlugin.Implementation, CodeGenPlugin.Implementation, CommonPlugin.Implementation, ConverterPlugin.Implementation, DataBindingEditPlugin.Implementation, DataBindingPlugin.Implementation, Ecore2EcorePlugin.Implementation, EcoreEditPlugin.Implementation, EcoreImporterPlugin.Implementation, EcorePlugin.Implementation, EMFEditPlugin.Implementation, ExporterPlugin.Implementation, ImporterPlugin.Implementation, JavaImporterPlugin.Implementation, MappingPlugin.Implementation, ODAEcorePlugin.Implementation, RoseImporterPlugin.Implementation, XcoreEditPlugin.Implementation, XcoreExporterPlugin.Implementation, XcoreImporterPlugin.Implementation, XcorePlugin.Implementation, XMIPlugin.Implementation
Enclosing class:
EMFPlugin

public abstract static class EMFPlugin.EclipsePlugin
extends Plugin
implements ResourceLocator, Logger, EMFPlugin.InternalEclipsePlugin

The actual implementation of an Eclipse Plugin.


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
EMFPlugin.EclipsePlugin()
          Creates an instance.
EMFPlugin.EclipsePlugin(IPluginDescriptor descriptor)
          Deprecated.  
 
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.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, start, startup, stop, 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. AbstractUIPlugin).

Constructor Detail

EMFPlugin.EclipsePlugin

public EMFPlugin.EclipsePlugin()
Creates an instance.


EMFPlugin.EclipsePlugin

@Deprecated
public EMFPlugin.EclipsePlugin(IPluginDescriptor descriptor)
Deprecated. 

Creates an instance.

Parameters:
descriptor - the description of the plugin.
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-2012 IBM Corporation and others.
All Rights Reserved.