EEF ComposedAdapterFactory [message #622103] |
Mon, 08 February 2010 22:11  |
Eclipse User |
|
|
|
It looks like the EEF **PropertiesEditionPartForms are not using the same strategy as the EMF generated editors to create the adapter factories? Looking at the source it looks like one is just created and then never modified. That means that I'm not getting the right label providers for references. If I hack it into "CreateMyObjectFlatComboViewer" like so:
owner = new EObjectFlatComboViewer(parent, true);
((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new ResourceItemProviderAdapterFactory());
((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new MyModelProviderAdapterFactory());
((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new MyModelSubPackageItemProviderAdapterFactory());
....
((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
owner.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
Then that does work, but obviously that's not very satisfactory. :) Is there a pattern that I'm missing here?
thanks,
Miles
|
|
|
Re: EEF ComposedAdapterFactory [message #622104 is a reply to message #622103] |
Tue, 09 February 2010 04:14  |
Eclipse User |
|
|
|
Hi Miles,
Thanks for your very interesting feedback. You're right about our
strategy for AdapterFactories. This isn't very satisfactory. We plan to
make a real improvment in the views (it includes the way to defines
adapter factories) but before that, we have a really important thing to
do: create Non-regression Tests.
We currently work on creating these tests and I hope we will finish this
week.
We will begin this phase of refund after.
Now I will check the bugs you open on EEF ;)
--
Goulwen Le Fur - goulwen.lefur@obeo.fr
Miles Parker a écrit :
> It looks like the EEF **PropertiesEditionPartForms are not using the
> same strategy as the EMF generated editors to create the adapter
> factories? Looking at the source it looks like one is just created and
> then never modified. That means that I'm not getting the right label
> providers for references. If I hack it into
> "CreateMyObjectFlatComboViewer" like so:
>
> owner = new EObjectFlatComboViewer(parent, true);
> ((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new
> ResourceItemProviderAdapterFactory());
> ((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new
> MyModelProviderAdapterFactory());
> ((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new
> MyModelSubPackageItemProviderAdapterFactory());
> ...
> ((ComposedAdapterFactory) adapterFactory).addAdapterFactory(new
> ReflectiveItemProviderAdapterFactory());
> owner.setLabelProvider(new
> AdapterFactoryLabelProvider(adapterFactory));
>
> Then that does work, but obviously that's not very satisfactory. :) Is
> there a pattern that I'm missing here?
>
> thanks,
>
> Miles
|
|
|
Powered by
FUDForum. Page generated in 0.03661 seconds