Skip to main content



      Home
Home » Modeling » EMF » How to get enums per emf reflections?
How to get enums per emf reflections? [message #1831803] Sun, 30 August 2020 04:12 Go to next message
Eclipse UserFriend
Hello all,

I am on imlementing a formular renderer based on a Emf class attributes. Currently the formular can find out all EAttributes and EReferences. My issue is eObject.eClass().getEAllAttributes() don't list me the enum attibutes. How can I access the enums?

EList<EAttribute> attributes = eObject.eClass().getEAllAttributes();
EList<EReference> eAllReferences = eObject.eClass().getEReferences();

for (EAttribute eAttribute : attributes) {
  // Render attributes
}

for (EReference eReference : eAllReferences) {
  // Render references
}


Are there something like eObject.eClass().getEEnums(); ?

Best regards
cim

--> Please close this thread the EAllAttributes() displayed all attributes of a class. I misunderstood that. Thanks.

[Updated on: Sun, 30 August 2020 04:22] by Moderator

Re: How to get enums per emf reflections? [message #1831804 is a reply to message #1831803] Sun, 30 August 2020 04:49 Go to previous message
Eclipse UserFriend
Yes eObject.eClass().getEAllAttributes() returns all EAttributes including those whose getEAttributeType() is an instanceof EEnum from which you can call getELiterals() to get all the literals.
Previous Topic:Load an ecore file programmatically
Next Topic:Textual to graphical or vice versa tools
Goto Forum:
  


Current Time: Sun Jul 13 10:53:07 EDT 2025

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

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

Back to the top