[EMF Forms] Using ViewModelService together with E4 DI [message #1251784] |
Thu, 20 February 2014 10:48  |
Eclipse User |
|
|
|
Hi,
I've started using EMF Forms from the latest RC release of ECP 1.2.x.
Now, when I've got embedded editor I need to implement my own ViewLocaleService and ReferenceService.
I'd like to somehow use dependency injection from E4 there or at least have access to IEclipseContext.
So far, all services are registered using rg.eclipse.emf.ecp.view.context.viewServices
extension point, so I do not have any access to this fancy feature.
One possible solution would be to use custom ViewModelContextFactory with extended ViewModelContextImpl, but this one is internal and has only internal export (thanks for this package export anyway).
Better solution would be to add possibility to add custom things to ViewModelContext or easier extending.
Maybe I overlooked something.
Any ideas?
Cheers,
Paweł.
|
|
|
Re: [EMF Forms] Using ViewModelService together with E4 DI [message #1252101 is a reply to message #1251784] |
Thu, 20 February 2014 18:32   |
Eclipse User |
|
|
|
Hi,
the general issue is, that we are single sourcing between 3.x and e4, so
any change, which makes us incompatible with 3.x is currently a no-go.
However, I would need to think about ways to make DI available, could
you file a BR for this?
Regards
Jonas
Am 20.02.2014 16:48, schrieb Paweł Doleciński:
> Hi,
>
> I've started using EMF Forms from the latest RC release of ECP 1.2.x.
>
> Now, when I've got embedded editor I need to implement my own
> ViewLocaleService and ReferenceService.
> I'd like to somehow use dependency injection from E4 there or at least
> have access to IEclipseContext.
>
> So far, all services are registered using
> rg.eclipse.emf.ecp.view.context.viewServices
> extension point, so I do not have any access to this fancy feature.
>
> One possible solution would be to use custom ViewModelContextFactory
> with extended ViewModelContextImpl, but this one is internal and has
> only internal export (thanks for this package export anyway).
>
> Better solution would be to add possibility to add custom things to
> ViewModelContext or easier extending.
>
> Maybe I overlooked something.
> Any ideas?
>
> Cheers,
> Paweł.
|
|
|
Re: [EMF Forms] Using ViewModelService together with E4 DI [message #1252480 is a reply to message #1252101] |
Fri, 21 February 2014 04:02  |
Eclipse User |
|
|
|
Hi,
I am aware about this compatibility issue. That's way I was thinking about having possibility to add eclipse context to the view context when it's needed without giving strict dependency. This would additionally allow to add any other custom things.
Because I thing it is not necessary to have DI (would be nice), but only flexibility on retrieving something from EclipseContext programmatically.
Here is BR: 428711
|
|
|
Powered by
FUDForum. Page generated in 0.09326 seconds