Class EclipseContextManager

java.lang.Object
org.eclipse.epsilon.eol.dt.launching.EclipseContextManager

public class EclipseContextManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Registers all OperationContributors contributed through the org.eclipse.epsilon.common.dt.operationContributor extension point with the operation contributor registry of the given context.
    static void
    setup(IEolContext context)
     
    static void
    setup(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
     
    static void
    setup(IEolContext context, org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.debug.core.ILaunch launch)
     
    static void
    setup(IEolContext context, org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.debug.core.ILaunch launch, boolean loadModels)
     
    static void
     
    static void
    teardown(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EclipseContextManager

      public EclipseContextManager()
  • Method Details

    • teardown

      public static void teardown(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
    • teardown

      public static void teardown(IEolContext context)
    • setup

      public static void setup(IEolContext context)
    • setup

      public static void setup(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
    • setup

      public static void setup(IEolContext context, org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.debug.core.ILaunch launch) throws Exception
      Throws:
      Exception
    • setup

      public static void setup(IEolContext context, org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.debug.core.ILaunch launch, boolean loadModels) throws Exception
      Throws:
      Exception
    • loadOperationContributors

      public static void loadOperationContributors(IEolContext context)
      Registers all OperationContributors contributed through the org.eclipse.epsilon.common.dt.operationContributor extension point with the operation contributor registry of the given context.

      Made public in 2.7 so that headless execution paths (e.g. the org.eclipse.epsilon.workflow Ant tasks) can reuse the same discovery logic instead of duplicating it, keeping the two in sync.

      This method is a no-op when no Eclipse extension registry is available. Platform.getExtensionRegistry() returns null whenever there is no running Equinox extension registry service in the current context — i.e. when the code is executing outside a live Eclipse Platform. This is exactly the situation on parts of the headless workflow path: the EUnit workflow tasks spawn a nested Ant build through the antRunner, whose E*L tasks run in a plain classloader with no OSGi/extension-registry service bound, so getExtensionRegistry() yields null. Before the guard below, dereferencing that null registry threw NullPointerException: Cannot invoke "IExtensionRegistry.getExtensionPoint(String)" because "registry" is null. This never surfaced previously because the method was only ever reached from setup(org.eclipse.epsilon.eol.execute.context.IEolContext), which always runs with a live registry.

      Returning early in that case is also the correct semantics: extension-point contributors can only be declared and discovered inside a live Eclipse Platform, so when no registry is available there is simply nothing to contribute, and the headless path must not fail.