| [news.eclipse.platform.rcp] Re: How to set services into handler |
Well ...
Currently when the handler executes, it gets the ExecutionEvent and from that can get the application context. That's an IEvaluationContext. From there you have access to any variables coming from a source provider (like the ones listed in org.eclipse.ui.ISources).
As for services, there are 2 kinds.
1) OSGi services. They can be requested from your BundleContext/ServiceTracker, usually be interacting with your Activator.
Thats it! Thanks for advice!
2) eclipse framework services. They're contributed through the org.eclipse.ui.services EP and retrieved through an IServiceLocator. Current IServiceLocators are any editor or view site, the workbench windows, and the workbench (PlatformUI.getWorkbench()) itself.
I will rethink that option for controlling views and presentation logic.