Project: Eclipse_Platform_UI
Bug 281148 Get rid of org.eclipse.e4.services extension point
Reported: 2009-06-22 16:54:24 | Status: resolved fixed

The org.eclipse.e4.services extension point is used as a way to generically contributed IContextFunctions so they can be used in components created in other bundles. There are some problems with this approach: - It is not lazy. The extension point gives the impression of lazy loading, but in fact the functions are loaded eagerly so they can be added to the context - It is not dynamic. You could theoretically withdraw a service by shutting down the bundle providing the extension, but there is no link to all the contexts that may be using the service at time of removal - Anybody wanting to use these contributed functions needs to write the wad of code to walk the extension registry and add the functions to their context - It has no arbitration mechanism to deal with multiple bundles providing the same service In short, this extension point is a poor man's version of OSGi services without all the well thought solutions to the problems of laziness, dynamicity, service arity, etc. Given that contexts now support OSGi services, we should transition away from the services extension point towards a pure OSGi service model.

Files changed in fix:
bundles/org.eclipse.e4.ui.services/src/org/eclipse/e4/ui/internal/services/Activator.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/ProgressMonitorFunction.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/ProgressMonitorFunction.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java examples/org.eclipse.e4.demo.e4photo/src/org/eclipse/e4/demo/e4photo/RealmFunction.java