[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2t] [Acceleo] Let block syntax

Hey,

I was wondering how to use the [let] block within Acceleo :

I tried the same syntax as in http://www.omg.org/spec/MOFM2T/1.0/

[template public classToJava(c : Class)]
[let ac : AssociationClass = c ]
class [c.name/]
{
// Constructor
[c.name/]()
{
}
// Association class methods
[for (t:Type | ac.endType)]
Attach_[t.name/]([t.name/] p[t.name/])
{
// Code for the method here
}
[/for]
}
[/let]
[/template]


But "ac.endType" raise the following error : "Init expression type does not conform to type of variable (ac)."

Did I miss something ?