[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: How to set services into handler

Paul Webster schrieb:
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!

I will use OSGi services in conjunction with Spring DM because I already have some application contexts on my client. So the only thing I need to do: publish them as OSGi-Services.

Advice for followers: I found easy to use information on http://springosgi.googlepages.com/ch03.html.

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.