hi jan,
you can easy add enumerations by yourself:
in your Root:
...........
«DEFINE Root FOR Model»
«EXPAND yourDomain::Enum::myEnumerations FOREACH allEnumerations()»
.........
and in your Xpand Template yourDomain/Enum.xpt:
........
/**
* this creates your Java enum class
*/
«DEFINE myEnumerations FOR uml::Enumeration»
«FILE packagePath()+"/"+name+".java"»
package «packageName()»;
«EXPAND Documentation::documentation»
public enum «name» {
«EXPAND allLiterals»
}
«ENDFILE»
«ENDDEFINE»
/**
* here are your literals
*/
«DEFINE allLiterals FOR uml::Enumeration»
«FOREACH ownedLiteral AS lit SEPARATOR ","»
«lit.name-» «EXPAND literal FOR lit-»
«ENDFOREACH-»
«ENDDEFINE»
/**
* if you have comments at literal level in your model
*/
«DEFINE literal FOR uml::EnumerationLiteral-»
«IF this.documentation().toString() != ""» «EXPAND comment FOR
this.ownedComment.get(0)» «ENDIF-»
«ENDDEFINE»
«DEFINE comment FOR uml::Comment»
/** «this.body.formatJavaDoc()» */«""-»
«ENDDEFINE»
........
in your Enum.xpt dont forget the imports of
java::Naming and java::Helper from the Java Basic Cartridge
and the Root.xpt needs an Extension with:
....
allEnumerations (Model m) : m.eAllContents.typeSelect(uml::Enumeration);
....
hope this helps and gives you some ideas how to solve it
regards
ekkehard
Jan Stamer-2 wrote:
>
> My modeled enumerations do not appear in the code..
> -> Are enumerations not supported yet?
>
> Thanks in advance!
> Jan
>
>
--
View this message in context:
http://www.nabble.com/Beginner%27s-Problems%3A-Using-the-JavaBasic-Cartridge-tf3823830s17564.html#a10891763
Sent from the Fornax-Platform mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer