|Getting e4-service from OSGi-service [message #1000911]
||Tue, 15 January 2013 17:10
| Anders Jönsson
Registered: January 2012
I want to use e4 services such as the EModelService and EPartService in an OSGi-services.
My OSGi-services are typically created using gemini blueprint, but that's not terribly important for this issue.
1. How can I get hold of e4 services in the OSGi service context?
2. Is there an OSGi-service providing these e4-services or any other kind of handle that can be reliably* reached from a OSGi-service (*there is the issue of creating the services in the right order, you ideally want them injected by the framework (e.g. blueprint) when they are ready).
3. Can the EventAdmin service be used in any way?
The reason for this is that I want to start my GUI components using an OSGi-service, avoiding a dependency to Eclipse e4.
|Re: Getting e4-service from OSGi-service [message #1001054 is a reply to message #1001046]
||Tue, 15 January 2013 23:34
| Thomas Schindl
Registered: July 2009
As Brian said, workbench services are NOT exposed as OSGi-Services|
because we e.g. want things like RAP work as well and then you have
multiple model instances, same is true for IEventBroker, ... they all
need to be isolated to an application *instance*.
You'll also notice that there multiple EPartService types
(ApplicationPartServiceImpl and PartServiceImpl) because an EPartService
is created through an ContextFunction so it's scope is narrowed even
more, same is true for other services, a user of this services inside an
e4 app does not have to and *should not* know about this!
Am 16.01.13 00:02, schrieb Anders Jönsson:
> Thanks a lot. I needed to hear that.
> This means I will proceed by doing something on my own on the "e4 side"
> to create the OSGi service as you suggest.
> I still don't get why it isn't done for you? I mean, I can't see the
> problem with, for instance, altering the e4 application model from an
> OSGi service. Makes me a little bit worried...
Powered by FUDForum
. Page generated in 0.77156 seconds