Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
E4/Contexts
Contexts
In the general, execution or evaluation contexts, that can provide information to the currently executing code.
IEquinoxContext
Bug 259423 Add notion of "context" that can be injected into objects
IServiceLocator
In Eclipse 3.x we have the notion of part hierarchy: Workbench, WorkbenchWindow, WorkbenchPart (Editor/View), and nested part (MultiPageEditorPart or PageBookView).
Bug 92646 comment #11 [Workbench [RCP] Allow developers to register Workbench services] There is a description of our services/service locator hierarchy in comment #11, basically we use this model to support 3 things:
- A service behaviour accessed through a local context (not PlatformUI :-)
- Scoping of the service to the local context
- Local service lifecycle, allowing the de-activation of contributions and listener clean up
IEvaluationContext
Provided by org.eclipse.core.expressions this is the application context used in 3.x by the IEvaluationService (and hence all declarative expressions like enabledWhen/activeWhen/visibleWhen)