|[Acceleo] use of macro / let(loop) [message #667644]
||Sat, 30 April 2011 14:21
Registered: April 2011
im trying do use a macro, but it simply wont work.
For Example, the following will return something like
" org.eclipse.emf.ecore.impl.DynamicEObjectImpl@2f1e34 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@167ed25 (name: OclInvalid_Class) (instanceClassName: null) (abstract: false, interface: false)) "
[comment encoding = UTF-8 /]
[template public generate(aClass : Class)]
[comment @main /]
[macro public test(arg : Class) : String]
i'm trying to use macros, so the code of the template gets clearer. What have i done wrong ^^?
Also, im trying to use a let block in a for loop, something like:
for[ aClass : Class | package.eContents(Class)]
[let var: String = aClass.name]
This returns same "error" as above, although all classes have names. If i do aClass.name "manually" it works.
I have a working template to generate vhdl code, but it is really hard to read, since a lot of code is just copy paste of really long expressions. would be nice to be able to tidy up.
Thanks for any help
Powered by FUDForum
. Page generated in 0.01796 seconds