Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How to extract all attribute names from my ecore metamodel
How to extract all attribute names from my ecore metamodel [message #668045] Tue, 03 May 2011 10:05 Go to next message
Carlos  is currently offline Carlos
Messages: 3
Registered: May 2011
Junior Member
Hi.

I would like to know how to get all the attribute names of my ecore metamodel in a list (from the application code).
I could explore the ecore XMI file using some parser and getting the attribute names, but I suppose that exists a smarter method to do it.
Have you got any suggestion?

Thanks in advance.
Regards.
Carlos.
Re: How to extract all attribute names from my ecore metamodel [message #668050 is a reply to message #668045] Tue, 03 May 2011 10:17 Go to previous message
Johannes Tietje is currently offline Johannes Tietje
Messages: 7
Registered: April 2011
Junior Member
Hi Carlos,

I don't think this topic belongs here, but if you have an object o whichs class directly or indirectly implementing EObject, you can invoke o.eClass().getEAllAttributes() to obtain all attributes.

Regards,
Johannes

[Updated on: Tue, 03 May 2011 10:18]

Report message to a moderator

Previous Topic:[Teneo/Hibernate] Logging configuration not working
Next Topic:[EEF] Update editor when semantic element change
Goto Forum:
  


Current Time: Thu Jul 24 00:40:44 EDT 2014

Powered by FUDForum. Page generated in 0.01823 seconds