Class EMFPlugin

All Implemented Interfaces:
Logger, ResourceLocator
Direct Known Subclasses:
CommonPlugin

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

    • IS_OSGI_RUNNING

      public static final boolean IS_OSGI_RUNNING
      Since:
      2.27
    • 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 Details

  • Method Details

    • 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 String getSymbolicName()
    • 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.
    • main

      public static void main(String[] args)