Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Using the e4 dependency injection implementation outside e4
Using the e4 dependency injection implementation outside e4 [message #507831] Thu, 14 January 2010 15:00 Go to next message
Eclipse UserFriend
Hello,

I would like to use the DI implementation of e4 outside of e4 (similar to Google Guice).

Is that possible? If yes, any pointer how to do this?

Best regards, Lars
Re: Using the e4 dependency injection implementation outside e4 [message #508350 is a reply to message #507831] Mon, 18 January 2010 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Lars Vogel wrote:
> Hello,
>
> I would like to use the DI implementation of e4 outside of e4 (similar
> to Google Guice).
> Is that possible? If yes, any pointer how to do this?

Pointers, probably not :-)

But it should be usable with 3 plugins: org.eclipse.e4.core.services,
org.eclipse.e4.core.services.annotations, and javax.inject

org.eclipse.e4.core.services.context.spi.ContextInjectionFac tory to
inject and make (instantiate and then inject) an object. It also
supports an "invoke" (allows you to call a method with inject
parameters). Then all you need is an IEclipseContext full of values
from org.eclipse.e4.core.services.context.EclipseContextFactory :-)

Later,
PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Using the e4 dependency injection implementation outside e4 [message #508470 is a reply to message #508350] Mon, 18 January 2010 18:38 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the tips. :-)

On 18.01.2010 06:05, Paul Webster wrote:
> Lars Vogel wrote:
>> Hello,
>>
>> I would like to use the DI implementation of e4 outside of e4 (similar
>> to Google Guice).
>> Is that possible? If yes, any pointer how to do this?
>
> Pointers, probably not :-)
>
> But it should be usable with 3 plugins: org.eclipse.e4.core.services,
> org.eclipse.e4.core.services.annotations, and javax.inject
>
> org.eclipse.e4.core.services.context.spi.ContextInjectionFac tory to
> inject and make (instantiate and then inject) an object. It also
> supports an "invoke" (allows you to call a method with inject
> parameters). Then all you need is an IEclipseContext full of values from
> org.eclipse.e4.core.services.context.EclipseContextFactory :-)
>
> Later,
> PW
>
>
Re: Using the e4 dependency injection implementation outside e4 [message #567673 is a reply to message #507831] Mon, 18 January 2010 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Lars Vogel wrote:
> Hello,
>
> I would like to use the DI implementation of e4 outside of e4 (similar
> to Google Guice).
> Is that possible? If yes, any pointer how to do this?

Pointers, probably not :-)

But it should be usable with 3 plugins: org.eclipse.e4.core.services,
org.eclipse.e4.core.services.annotations, and javax.inject

org.eclipse.e4.core.services.context.spi.ContextInjectionFac tory to
inject and make (instantiate and then inject) an object. It also
supports an "invoke" (allows you to call a method with inject
parameters). Then all you need is an IEclipseContext full of values
from org.eclipse.e4.core.services.context.EclipseContextFactory :-)

Later,
PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Using the e4 dependency injection implementation outside e4 [message #567767 is a reply to message #508350] Mon, 18 January 2010 23:12 Go to previous message
Eclipse UserFriend
Thanks for the tips. :-)

On 18.01.2010 06:05, Paul Webster wrote:
> Lars Vogel wrote:
>> Hello,
>>
>> I would like to use the DI implementation of e4 outside of e4 (similar
>> to Google Guice).
>> Is that possible? If yes, any pointer how to do this?
>
> Pointers, probably not :-)
>
> But it should be usable with 3 plugins: org.eclipse.e4.core.services,
> org.eclipse.e4.core.services.annotations, and javax.inject
>
> org.eclipse.e4.core.services.context.spi.ContextInjectionFac tory to
> inject and make (instantiate and then inject) an object. It also
> supports an "invoke" (allows you to call a method with inject
> parameters). Then all you need is an IEclipseContext full of values from
> org.eclipse.e4.core.services.context.EclipseContextFactory :-)
>
> Later,
> PW
>
>
Previous Topic:Where is the ShowView-dialog in the e4 photo demo?
Next Topic:How to create a new Part Dynamically
Goto Forum:
  


Current Time: Wed Jul 09 08:22:11 EDT 2025

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

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

Back to the top