Using services and contexts
An IDE is more than a collection of its component parts, and the Eclipse 4 framework allows these to coordinate and communicate with each other.
In prior releases of Eclipse, the Platform
(or PlatformUI
) object would act as an oracle of all the known services in the runtime infrastructure, as well as providing hooks for accessing those services, for example:
IExtensionRegistry registry = Platform.getExtensionRegistry(); IWorkbench workbench = PlatformUI.getWorkbench();
Although this provides a programmatic way of making the services available, it has two key disadvantages:
- The provider of the interface is tightly coupled with the bundle containing the accessor, even if they are unrelated
- Introducing new services requires ...
Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.