Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Use ExtendedObjectSupplier for pure @Inject annotations?
Use ExtendedObjectSupplier for pure @Inject annotations? [message #901496] Mon, 13 August 2012 07:27 Go to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member

Hi,

AFAIK, I can register my ExtendedObjectSupplier for my own annotations. Field, methods and the like need then to be annotated with both, @Inject and @MyAnnotation.

Is there a way to register an ExtendedObjectSupplier for pure @Inject annotations too? I'd like to seamlessly integrate my Guice injector into Eclipse DI - if possible.

Thanks
Re: Use ExtendedObjectSupplier for pure @Inject annotations? [message #901501 is a reply to message #901496] Mon, 13 August 2012 07:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No

Tom

Am 13.08.12 09:27, schrieb Marcel Bruch:
> Hi,
>
> AFAIK, I can register my ExtendedObjectSupplier for my own annotations.
> Field, methods and the like need then to be annotated with both, @Inject
> and @MyAnnotation.
>
> Is there a way to register an ExtendedObjectSupplier for pure @Inject
> annotations too? I'd like to seamlessly integrate my Guice injector
> into Eclipse DI - if possible.
>
> Thanks
Re: Use ExtendedObjectSupplier for pure @Inject annotations? [message #901561 is a reply to message #901501] Mon, 13 August 2012 12:04 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

I would be nervous about having two DI engines in the first place...

Having the Eclipse DI engine and Guice coexist, wouldn't be an issue but having an object/instance associated with more than one DI engine would just be inviting trouble. (Even if it were possible.)
Re: Use ExtendedObjectSupplier for pure @Inject annotations? [message #901562 is a reply to message #901561] Mon, 13 August 2012 12:20 Go to previous message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member


FWIW, I'm looking for ways how to migrate from Guice to e4 to make use of the dynamics of, for instance, @Preferences and the like.

Unfortunately, it seems to be "not as easy as I hoped" Smile We have complex object data structures we assemble with Guice. For instantiating object graphs in e4 we use our own ExtensionFactory. It would be nice if registering an "elsewhere created" object with the e4 DI container would be possible. Then I may be able to get updates from the e4 DI container (for preferences updates for instance) but may continue assembling my objects using Guice.

Regarding the (implicit) question why I need two frameworks:
Converting Guice Modules to some kind of e4 configuration would be ultimate goal as soon as e4 supports generics properly and maybe offers a nice DI configuration interface. I don't have to rely on Guice in Eclipse 4.

Thanks for the comments
Marcel
Previous Topic:Eclipse unbearably slow
Next Topic:Combo-(viewer) XWT-Databinding trouble
Goto Forum:
  


Current Time: Thu Apr 25 14:57:06 GMT 2024

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

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

Back to the top