|
Re: Using generated itemproviders from another plugin [message #430935 is a reply to message #430934] |
Thu, 18 June 2009 11:07 |
Conor O'Mahony Messages: 108 Registered: July 2009 |
Senior Member |
|
|
Hi,
Sorry I've found the answer for this,
I needed to add the 2nd model's ItemProviderAdapterFactory to the ComposedAdapterFactory used by the
application.
....
factories.add(new Model2ItemProviderAdapterFactory());
....
adapterFactory = new ComposedAdapterFactory(factories);
Regards,
Conor
Conor O'Mahony wrote:
> Hi,
>
> I have an EMF model in one plugin, and the ecore is referencing another
> ecore in a different plugin,
> i.e.
> TypeA has a containment reference to TypeB which is in a different model.
>
> plugin 1 (ecore 1)
> TypeA
> name: String
> comment: String
> ...
> references: TypeB(0..n)
> ....
>
> plugin 2 (ecore 2)
> TypeB
> name: String
> etc...
>
>
> When I generate the model and edit code I can use it in my RCP
> application and can generate instances of the model with instances of
> TypeB contained within an instance of TypeA.
>
> However it does not automatically use the generated ItemProvider for
> TypeB - I have changed the genmodel for TypeB to not show certain
> properties, but when looking at an instance of TypeB contained in TypeA
> from within my application, all the properties are shown and are editable -
> What is the best way for hooking in the ItemProvider for TypeB? do i
> need to modify the generated code from ecore1 to manually reference the
> ItemProvider in plugin2? Or is there a better way of doing all this?
>
> Many thanks for your help,
> Conor
|
|
|
Powered by
FUDForum. Page generated in 0.02847 seconds