Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsEAnnotation and DynamicEObjectImpl
https://www.eclipse.org/forums/index.php/mv/msg/158948/502016/#msg_502016
Thank you.]]>Chessman 2009-12-04T19:18:59-00:00Re: EAnnotation and DynamicEObjectImpl
https://www.eclipse.org/forums/index.php/mv/msg/158948/502022/#msg_502022
Comments below.
Chessman wrote:
> I am developing a tool to control ecore metamodel and model versions.
> I'm using eAnnotation to put version information in the models.
> However, when a model os loaded, it ts generated DynamicEObjectImpl
> instances instead of a EModelElement descendant. Therefore, I am not
> been able to access aAnnotations reference. The metamodel's elements
> are all descendents of EModelElement. Does anybody know how to access
> eAnnotations from a DynamicEObjectImpl instance?
Not all models extend Ecore. In fact I typically advise against
extending Ecore. It sounds like there's some meta-level confusion
here. You should go from your instance to the Ecore model of it using
EObject.eClass() and from that EClass you'll be able to fetch the
EAnnotations associated with it.
>
> Thank you.]]>Ed Merks2009-12-04T19:35:18-00:00