Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] E4 Formal API Part 3: App Context

Hi,

Instead of providing CIF I'd propose to publish something more light
weight (not exposing IEclipseContext).

interface DIEngine {
   public void create(Class<?> clazz);
   public DIEngine createSubengine(String name);
   public void map(String key, Object value);
   public void map(Class<O> clazz, Object o);
   public void dispose();
}

The DIEngine would be contributed as an IContextFunction through DS.
What I don't like with our current user code DI store is that we make
them depend on IEC which is at least to me more an implementation detail.

BTW we are publishing the CIF as IContributionFactory and
IContributionFactorySpi but they are based upon urls instead of classes
and they also expose the IEclipseContext.

Tom

Am 08.03.13 14:57, schrieb Wim Jongman:
> Because it is a static factory and the rest is a service. Same goes for
> the model factories? 
> 
> Regards,
> 
> Wim
> 
> 
> On Fri, Mar 8, 2013 at 1:00 PM, Jonas Helming
> <jonas.helming@xxxxxxxxxxxxxx <mailto:jonas.helming@xxxxxxxxxxxxxx>> wrote:
> 
>     Hi,
>     why does it feel wrong? As long as it is stateless it seems OK for me.
>     Best Regards
>     Jonas
> 
> 
>     Am 08.03.2013 07:31, schrieb Lars Vogel:
>>     Should we not also create a service for ContextInjectionFactory?
>>     Feels wrong to use a Factory to perform the dependency injection. 
>>
>>     2013/3/7 Eric Moffatt <emoffatt@xxxxxxxxxx
>>     <mailto:emoffatt@xxxxxxxxxx>>
>>
>>
>>         OK, here's the third part
>>         http://wiki.eclipse.org/Eclipse4/API/AppContext, giving
>>         Services and other elements (@Named things) that are
>>         guaranteed to be available from the application's (window's?)
>>         context. My comments are already on the wiki. Again everybody
>>         feel free to comment...
>>
>>         I'll let the wiki soak for a bit to give everyone a chance to
>>         have their say and then refine the pages based on the feedback.
>>
>>         Everyone should look for missing things such as the Life Cycle
>>         annotations.
>>
>>         Over the next few days we expect to be taking the initial code
>>         actions necessary (i.e. changing packages to API and adding
>>         @NoReference etc to stuff we don't want to formalize (yet)).
>>
>>         On the model side we expect to *remove* the more funky of the
>>         menu / tb items as well as adding in an MCompositePart (an
>>         MPart that is also an MPartSashContainer (to support split
>>         parts...).
>>
>>         Now that I understand what @Active does and that the
>>         ESelectionService actually contains more functionality than is
>>         available through DI (i.e. 'post' selection listeners) the
>>         only remaining question that I'm aware of is which of
>>         ContextFunction / IContextFunction we should go with...
>>
>>         Also I've added the IEventBroker to the list of services since
>>         even though most listeners should be able to use the @Topic
>>         annotation there's no way to *unregister* transient listeners
>>         using DI...
>>
>>         If we can get it done I'd really like to have this (at least
>>         mostly) available in M6. Then I'd ask folks that have
>>         tutorials / examples etc to check whether they still have any
>>         references to non-API in them and figure out if it's something
>>         we missed or whether we should update the code to use the
>>         proper API...
>>
>>         Thanks a lot for the feedback so far, keep it up !
>>         Eric
>>
>>         _______________________________________________
>>         e4-dev mailing list
>>         e4-dev@xxxxxxxxxxx <mailto:e4-dev@xxxxxxxxxxx>
>>         https://dev.eclipse.org/mailman/listinfo/e4-dev
>>
>>
>>
>>
>>     _______________________________________________
>>     e4-dev mailing list
>>     e4-dev@xxxxxxxxxxx <mailto:e4-dev@xxxxxxxxxxx>
>>     https://dev.eclipse.org/mailman/listinfo/e4-dev
> 
> 
>     _______________________________________________
>     e4-dev mailing list
>     e4-dev@xxxxxxxxxxx <mailto:e4-dev@xxxxxxxxxxx>
>     https://dev.eclipse.org/mailman/listinfo/e4-dev
> 
> 
> 
> 
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/e4-dev
> 


-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                 geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
http://www.BestSolution.at                      phone    ++43 512 935834


Back to the top