Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EAnnotation and DynamicEObjectImpl(Cannot access eAnnotations from DynamicEObjectImpl)
icon5.gif  EAnnotation and DynamicEObjectImpl [message #502016] Fri, 04 December 2009 19:18 Go to next message
Chessman  is currently offline Chessman Friend
Messages: 1
Registered: December 2009
Junior Member
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 19:35 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30650
Registered: July 2009
Senior Member
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: Wed Nov 20 12:11:07 GMT 2019

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

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

Back to the top