|[Acceleo] Code Beautifying [message #484528]
||Tue, 08 September 2009 06:57
| Timothy Marc
Registered: July 2009
just started yesterday my first steps with Acceleo. I've some general
questions concerning the beautification of the generated code.
1. Is there a common rule for indentation? When i write my templates
with normal indentation, like this
[file (testContext.name.concat('.ttcn3'), false)]
[for (dPool : DataPool | testContext.allDataPool)]
the outcoming is very ugly aligned, since the whole [genTypes/] part is
too much indented.
2. How to use the seperator(',') construct correctly in a for-loop.
Currentlty, the , will be inserted in the next line, not after the
, integer data optional
The loop looks like
[for (p:Property | c.oclAsType(Classifier).attribute) separator(',')]
3. Is it possible to pass a Set as a template parameter?
4. I've tried to pass a parameter like c.oclAsKindOf(Class), where c is
a Classifier, but Acceleo told me, that such an template doesn't exist.
Well, the template is there.
[template public class2type(c:Class)]
Is it possible to downcast an object during the invocation of a template?
Thanks a lot
Powered by FUDForum
. Page generated in 0.02904 seconds