Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse Services as OSGi services(Some services seems to not be declared as OSGi services)
Eclipse Services as OSGi services [message #1692189] Tue, 14 April 2015 08:41 Go to next message
Loic Faure is currently offline Loic FaureFriend
Messages: 24
Registered: December 2014
Junior Member
Hi,

With the OSGi console, I checked which services can be retrieve from the activator with it IEclipseContext, but it seems that they are not all there.

In my use case, I need to instantiate a part programmatically from a PartDescriptor but I cannot retrieve the EPartService and the EModelService with inejction. So i think about do it with the IEclipseContext from the activator which can provide OSGI declared services.

The EPartService is already declared as an OSGi service, What about the EModelService ?

Thanks
Re: Eclipse Services as OSGi services [message #1692190 is a reply to message #1692189] Tue, 14 April 2015 08:45 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Where and when are you trying to do what?

Quote:
I need to instantiate a part programmatically from a PartDescriptor


Where are you trying to do that?
Re: Eclipse Services as OSGi services [message #1692191 is a reply to message #1692190] Tue, 14 April 2015 08:50 Go to previous messageGo to next message
Loic Faure is currently offline Loic FaureFriend
Messages: 24
Registered: December 2014
Junior Member
In an attempt to migrate a 3x app to 4x, I have to open a part, which was before an editor, when a file is dropped in eclipse via a custom smart drag and drop in a utilities class that handle the drop
Re: Eclipse Services as OSGi services [message #1692197 is a reply to message #1692191] Tue, 14 April 2015 09:21 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
That doesn't answer my question. Is it an OSGi service? Is it a handler implementation? Where is it called and where does it try to get the services injected from?
Re: Eclipse Services as OSGi services [message #1692575 is a reply to message #1692197] Thu, 16 April 2015 15:06 Go to previous messageGo to next message
Eclipse UserFriend
Although the EPartService is configured as an OSGI Declarative Service, it actually registers an E4 Context Function that creates or finds the appropriate EPartService instance for a particular location in the E4 context tree. You can't request it as a plain old OSGi Service.

Your utility class needs to be provided the window from which you can retrieve the necessary contexts and services.

Brian.
Re: Eclipse Services as OSGi services [message #1692691 is a reply to message #1692575] Fri, 17 April 2015 11:07 Go to previous message
Loic Faure is currently offline Loic FaureFriend
Messages: 24
Registered: December 2014
Junior Member
@Dirk
It's from a SWT DnD handler but between the call of the class and the handler, there is lots of method calls, so I can't pass the services I need to this classes.

@Brian
Ok, I think I need to re-design the classes of this plugin

Thanks !
Previous Topic:Editor Questions - multiple editors / Form Editor in e4
Next Topic:Part descriptor in Show View dialog
Goto Forum:
  


Current Time: Fri Mar 29 13:14:21 GMT 2024

Powered by FUDForum. Page generated in 0.02359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top