|
Re: Getting e4-service from OSGi-service [message #1000924 is a reply to message #1000911] |
Tue, 15 January 2013 17:42 |
Eclipse User |
|
|
|
I don't think you can, out of the box. E4 services are requested through an application-specific context, and E4 tries its best to avoid having any kind of singletons to enable hosting multiple application instances within the same VM.
But there's nothing stopping you from exposing your single MAppplication instance as an OSGI service though (e.g., through a model processor).
Brian.
|
|
|
|
Re: Getting e4-service from OSGi-service [message #1001054 is a reply to message #1001046] |
Tue, 15 January 2013 23:34 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
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!
Tom
Am 16.01.13 00:02, schrieb Anders Jönsson:
> Brian,
> 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...
>
> ///Anders
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03430 seconds