[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2t] [Acceleo] Let block syntax
|
- From: Guillaume Bourel <gbourel@xxxxxx>
- Date: Thu, 27 Aug 2009 12:03:14 +0200
- Newsgroups: eclipse.modeling.m2t
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
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 ?