Skip to main content



      Home
Home » Modeling » EMF » EAnnotation and DynamicEObjectImpl(Cannot access eAnnotations from DynamicEObjectImpl)
icon5.gif  EAnnotation and DynamicEObjectImpl [message #502016] Fri, 04 December 2009 14:18 Go to next message
Eclipse UserFriend
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?

Thank you.
Re: EAnnotation and DynamicEObjectImpl [message #502022 is a reply to message #502016] Fri, 04 December 2009 14:35 Go to previous message
Eclipse UserFriend
Chessman,

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.
Previous Topic:Implementing Undo properly with multiple EditingDomain and lots of commands
Next Topic:[teneo] versions?
Goto Forum:
  


Current Time: Sun Jul 13 20:50:54 EDT 2025

Powered by FUDForum. Page generated in 0.05493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top