Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326190 - [EclipseContext] revisit how services are looked-up and contributed
Summary: [EclipseContext] revisit how services are looked-up and contributed
Status: RESOLVED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-24 14:38 EDT by Paul Webster CLA
Modified: 2019-06-05 07:47 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-09-24 14:38:28 EDT
you can add a "service" 5 ways, each with different implications for when it is available

- when the MPart is created you can just set X.class.getName() => xInstance

- you can set X.class.getName() => context function, that will instantiate and return the xInstance when asked

- you can use the event broker to listen for a context being set, and then perform one of the above 2 steps

- you can provide a context function through DS which will then be available at the root context

- you can simply provide an OSGi service which will be available at the root context
Comment 1 Paul Webster CLA 2010-09-24 14:41:04 EDT
We are adding most of our services 3 ways.  

1) By simply adding them to the context, like in
org.eclipse.e4.ui.internal.workbench.E4Workbench.createWorkbenchContext(IEclipseContext,
IExtensionRegistry, IExceptionHandler, IContributionFactory) (not extensible).  

2) we feed in an OSGi service.

3) we provide a creation function using #1 or #2, which acts like a factory to provide real services when requested.

PW
Comment 2 Paul Webster CLA 2010-11-24 10:53:14 EST
I'm currently working on lifecycle for commands/contexts/keybinding services in bug 329646.

1) An addon to make the service and support managers available in the context belonging to MApplication

2) An addon to process the model and add event handlers for model changes

3) For the compatibility layer only, a Model processor to push relevant extension point information into the model

PW
Comment 3 Eclipse Genie CLA 2018-11-27 02:13:20 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Lars Vogel CLA 2019-06-05 07:47:45 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.