Class EMFPlugin.EclipsePlugin

java.lang.Object
org.eclipse.core.runtime.Plugin
org.eclipse.emf.common.EMFPlugin.EclipsePlugin
All Implemented Interfaces:
EMFPlugin.InternalEclipsePlugin, Logger, ResourceLocator, org.osgi.framework.BundleActivator
Direct Known Subclasses:
CommonPlugin.Implementation
Enclosing class:
EMFPlugin

public abstract static class EMFPlugin.EclipsePlugin extends org.eclipse.core.runtime.Plugin implements ResourceLocator, Logger, EMFPlugin.InternalEclipsePlugin
The actual implementation of an Eclipse Plugin.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    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

    Constructors
    Constructor
    Description
    Creates an instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object
    Does the work of fetching the image associated with the key.
    Returns the URL from which all resources are based.
    Returns the description that can be used to create the image resource associated with the key.
    Returns the string resource associated with the key.
    getString(String key, boolean translate)
    Returns the string resource associated with the key.
    getString(String key, Object[] substitutions)
    Returns a string resource associated with the key, and performs substitutions.
    getString(String key, Object[] substitutions, boolean translate)
    Returns a string resource associated with the key, and performs substitutions.
    Return the plugin ID.
    void
    log(Object logEntry)
    Logs an entry.

    Methods inherited from class org.eclipse.core.runtime.Plugin

    find, find, getBundle, 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 Details

    • 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 Details

    • EclipsePlugin

      public EclipsePlugin()
      Creates an instance.
  • Method Details

    • getSymbolicName

      public String getSymbolicName()
      Return the plugin ID.
      Specified by:
      getSymbolicName in interface EMFPlugin.InternalEclipsePlugin
    • getBaseURL

      public 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 Object getImage(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 Object doGetImage(String key) throws 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:
      IOException - if an image doesn't exist.
    • getString

      public String getString(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 String getString(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 String getString(String key, 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:
    • getString

      public String getString(String key, 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:
    • log

      public void log(Object logEntry)
      Description copied from interface: Logger
      Logs an entry.
      Specified by:
      log in interface Logger
      Parameters:
      logEntry - a plastic entry to log.