Hello there,
I am generating a code using as an input Metamodel (an UML one).
--> I would like to know how to get a default value of an EnumerationLiteral attribute. The problem is that I cannot use Acceleo method named defaultValue. I also tried getValue() but the parameters is not allow me to use it in this case. (See at the code bellow).
[template private processEnumerationlitteral(e : Enumeration) post (trim())]
[for ( el: EnumerationLiteral | e.eAllContents(EnumerationLiteral))]
[if (e.getValue(enumaration, e.name))]
<symbol name="[el.name/]" value="[el.getValue(enumaration, e.name)/]"/>
[else]
<symbol name="[el.name/]"/>
[/if]
[/for]
[/template]
--> My second problem concerns the association. I would like to get a target name of an association but everything I have tried won't work. (See at the code bellow).
[if (c.clientDependency->notEmpty())]
Class [c.name/]
[for (d : Dependency | c.clientDependency)]
target --> [d.target/]
target name --> [d.target.name/]
[/for]
[/if]
Thank you for your advice.
[Updated on: Tue, 07 May 2013 10:40]
Report message to a moderator