|[Acceleo] Random order in UML for sequence of datatypes [message #1221354]
||Tue, 17 December 2013 14:03
| Johan Hardy
Registered: December 2012
I'm developing a generator UML to C based on Acceleo. One of my transformations is the generation of typedef in C. With the help of a profile, I mapped a stereotype called typedef on the meta-class datatype.
In the template, when I want to generate all the types and for instance the typedefs, I filter all the types of a Class to get a sequence of datatypes (with the stereotype 'typedef' applied). Here is my transformation:
[query public getAllTypedef(seq : Sequence(uml::DataType)) : Sequence(uml::DataType) =
seq->select(d : uml::DataType | (hasStereotype(d, 'functional_C::Typedef')))->asSequence()/]
[template public genHTypedef(c : uml::Class) post(trim())]
[let seq : Sequence(uml::DataType) = getAllTypedef(ownedElement->filter(uml::DataType)->asSequence())]
[for (d : uml::DataType | seq )]
My problem is that the typedefs are not generated in the same order from one generation to another AND the MODEL REMAINS the same. For example, Class A with datatype B and datatype C gives at the first generation:
And, for the second generation (the class remains the same) :
Does anyone know why the sequence of datatypes has different order from one generation to another ?
Does anyone know how to solve this problem ?
[Updated on: Wed, 18 December 2013 12:14]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01782 seconds