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 14:05 Go to next message
Carlos  is currently offline Carlos Friend
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 14:17 Go to previous message
Johannes Tietje is currently offline Johannes TietjeFriend
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 14: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: Fri Dec 19 08:54:30 GMT 2014

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

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