## org.eclipse.emf.common
Class EMFPlugin

    java.lang.Object
      org.eclipse.emf.common.util.DelegatingResourceLocator
          org.eclipse.emf.common.EMFPlugin

All Implemented Interfaces:
  Logger, ResourceLocator

Direct Known Subclasses:
  ChangeEditPlugin, ChangePlugin, CheatSheetsPlugin, CodeGenEcorePlugin, CodeGenPlugin, CommonPlugin, CommonUIPlugin, ConverterPlugin, DataBindingEditPlugin, DataBindingPlugin, Ecore2EcoreEditorPlugin, Ecore2EcorePlugin, Ecore2XMLUIPlugin, EcoreEditorPlugin, EcoreEditPlugin, EcoreImporterPlugin, EcorePlugin, EMFEditPlugin, EMFEditUIPlugin, ExporterPlugin, GenModelEditPlugin, ImporterPlugin, JavaImporterPlugin, MappingPlugin, RoseImporterPlugin, XMIPlugin

    public abstract class EMFPlugin

extends DelegatingResourceLocator
implements ResourceLocator, Logger

EMF must run within an Eclipse workbench, within a headless Eclipse workspace, or just stand-alone as part of some other application. To support this, all resource access (e.g., NL strings, images, and so on) is directed to the resource locator methods, which can redirect the service as appropriate to the runtime. During Eclipse invocation, the implementation delegates to a plugin implementation. During stand-alone invocation, no plugin initialization takes place, so the implementation delegates to a resource JAR on the CLASSPATH. The resource jar will typically not be on the CLASSPATH during Eclipse invocation. It will contain things like the icons and the .properties, which are available in a different way during Eclipse invocation.

See Also:
  `DelegatingResourceLocator`, `ResourceLocator`, `Logger`

Nested Class Summary
`static class` `EMFPlugin.EclipsePlugin` The actual implementation of an Eclipse Plugin.
`static interface` `EMFPlugin.InternalEclipsePlugin` This just provides a common interface for the Eclipse plugins supported by EMF.
`static class` `EMFPlugin.InternalHelper` This just provides a common delegate for non-UI and UI plug-in classes.

Field Summary
`protected ResourceLocator[]` `delegateResourceLocators`
`static boolean` `IS_ECLIPSE_RUNNING`
`static boolean` `IS_RESOURCES_BUNDLE_AVAILABLE`

Fields inherited from class org.eclipse.emf.common.util.DelegatingResourceLocator
`baseURL, images, resourceBundle, shouldTranslate, strings, untranslatedResourceBundle, untranslatedStrings`

Constructor Summary
`EMFPlugin(ResourceLocator[] delegateResourceLocators)`

Method Summary
`protected ResourceLocator[]` `getDelegateResourceLocators()` Returns the delegate resource locators.
`Logger` `getPluginLogger()` Returns an Eclipse plugin implementation of a logger.
`abstract ResourceLocator` `getPluginResourceLocator()` Returns an Eclipse plugin implementation of a resource locator.
`protected ResourceLocator` `getPrimaryResourceLocator()` Returns the primary resource locator.
`java.lang.String` `getSymbolicName()`
`void` `log(java.lang.Object logEntry)` Logs an entry.
`static void` `main(java.lang.String[] args)`

Methods inherited from class org.eclipse.emf.common.util.DelegatingResourceLocator
`delegatedGetImage, delegatedGetString, doGetImage, doGetString, extensionFor, getBaseURL, getImage, getString, getString, getString, getString, setShouldTranslate, shouldTranslate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.emf.common.util.ResourceLocator
`getBaseURL, getImage, getString, getString, getString, getString`

Field Detail

### IS_ECLIPSE_RUNNING

    public static final boolean IS_ECLIPSE_RUNNING

### IS_RESOURCES_BUNDLE_AVAILABLE

    public static final boolean IS_RESOURCES_BUNDLE_AVAILABLE

### delegateResourceLocators

    protected ResourceLocator[] delegateResourceLocators

Constructor Detail

### EMFPlugin

    public EMFPlugin(ResourceLocator[] delegateResourceLocators)

Method Detail

### getPluginResourceLocator

    public abstract ResourceLocator getPluginResourceLocator()

  Returns an Eclipse plugin implementation of a resource locator.

  Returns:
    an Eclipse plugin implementation of a resource locator.

### getPrimaryResourceLocator

    protected final ResourceLocator getPrimaryResourceLocator()

  Description copied from class: `DelegatingResourceLocator`
  Returns the primary resource locator.

  Specified by:
    `getPrimaryResourceLocator` in class `DelegatingResourceLocator`
  Returns:
    the primary resource locator.

### getDelegateResourceLocators

    protected ResourceLocator[] getDelegateResourceLocators()

  Description copied from class: `DelegatingResourceLocator`
  Returns the delegate resource locators.

  Specified by:
    `getDelegateResourceLocators` in class `DelegatingResourceLocator`
  Returns:
    the delegate resource locators.

### getPluginLogger

    public Logger getPluginLogger()

  Returns an Eclipse plugin implementation of a logger.

  Returns:
    an Eclipse plugin implementation of a logger.

### getSymbolicName

    public java.lang.String getSymbolicName()

### 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.

### main

    public static void main(java.lang.String[] args)

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