Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » inject OSGİ Service
inject OSGİ Service [message #1710649] Thu, 08 October 2015 08:22 Go to next message
Jeyhun MAMEDOV is currently offline Jeyhun MAMEDOVFriend
Messages: 21
Registered: March 2014
Junior Member
Hi

How can I inject (@Inject) OSGİ Service defined as ComponentFactory in DS into menu handler?

Thanks in advance...
(no subject) [message #1710659 is a reply to message #1710649] Thu, 08 October 2015 08:56 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Our @Service annotation does the look up with the context of the
requesting bundle (it must be marked as "Bundle-ActivationPolicy: lazy"
so that we can get the correct context!)

class MyComponent {
@Inject
@Service
private MyService service;
}

Please note this e(fx)clipse specific (or at least you need to add some
of our core bundles if you work in e4-swt!)

Tom

On 08.10.15 10:22, Jeyhun MAMEDOV wrote:
> Hi
>
> How can I inject (@Inject) OSGİ Service defined as ComponentFactory in
> DS into menu handler?
>
> Thanks in advance...
Previous Topic:Forwarding Program Args to fxpackager
Next Topic:Export e(fx)clipse based application
Goto Forum:
  


Current Time: Fri Apr 26 12:35:12 GMT 2024

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

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

Back to the top