Class EclipseContextManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidloadOperationContributors(IEolContext context) Registers allOperationContributors contributed through theorg.eclipse.epsilon.common.dt.operationContributorextension point with the operation contributor registry of the given context.static voidsetup(IEolContext context) static voidsetup(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor) static voidsetup(IEolContext context, org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.debug.core.ILaunch launch) static voidsetup(IEolContext context, org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.debug.core.ILaunch launch, boolean loadModels) static voidteardown(IEolContext context) static voidteardown(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
-
Constructor Details
-
EclipseContextManager
public EclipseContextManager()
-
-
Method Details
-
teardown
public static void teardown(IEolContext context, org.eclipse.core.runtime.IProgressMonitor progressMonitor) -
teardown
-
setup
-
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
Registers allOperationContributors contributed through theorg.eclipse.epsilon.common.dt.operationContributorextension 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.workflowAnt 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()returnsnullwhenever 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 theantRunner, whose E*L tasks run in a plain classloader with no OSGi/extension-registry service bound, sogetExtensionRegistry()yieldsnull. Before the guard below, dereferencing thatnullregistry threwNullPointerException: Cannot invoke "IExtensionRegistry.getExtensionPoint(String)" because "registry" is null. This never surfaced previously because the method was only ever reached fromsetup(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.
-