Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » modeling attribute as enum in ecore
modeling attribute as enum in ecore [message #1765109] Tue, 06 June 2017 14:13 Go to next message
Eclipse UserFriend
This has got to be simple but it is getting past me.

I have modeled enums before when generating from xsd. Now I need use ecore and I am not getting what should be easy.

Here's what I want the generated code to look like. How do I model this in ecore?

JavaClass {

   enum XYZ {X, Y, Z};

   private XYZ xyz;

}


Thanks
Re: modeling attribute as enum in ecore [message #1765144 is a reply to message #1765109] Tue, 06 June 2017 23:31 Go to previous message
Eclipse UserFriend
EMF will never generate an enum nested in some other class. You create an EEnum just like you do an EClass or an EDataType directly as a child of the EPackage. Then you can create EENumLiterals as children of the EEnum.
Previous Topic:can-not open xmI files
Next Topic:[EMF Forms] Ecore and Genmodel editor issues
Goto Forum:
  


Current Time: Sat Jun 14 23:38:19 EDT 2025

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

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

Back to the top