|
Re: Find ItemPropertyDescriptors by EClass instead of concrete instance [message #899893 is a reply to message #899807] |
Thu, 02 August 2012 17:26 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Erdal,
Comments below.
On 02/08/2012 2:14 PM, Erdal Karaca wrote:
> Is there a way to get an all IItemPropertyDescriptors by its EClass
> instead of providing a concrete instance of that type?
Not really.
>
> E.g.
>
> I have the type MyType for which the gen model will generate a
> MyTypeItemProvider.
> If I want to get all IItemPropertyDescriptors, I have to do it this way:
>
> AdapterFactoryItemDelegator afid = new AdapterFactoryItemDelegator(new
> ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE));
>
> MyType obj = MyModelFactory.eInstance.createMyType();
> List<IItemPropertyDescriptor> desc = afid.getPropertyDescriptors(obj);
>
> If I just provide the EClass to the getPropertyDescriptors(), then I
> will get the EClassItemProvider of ecore's edit model...
That's all there is available.
>
> Any hints?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02645 seconds