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

Guillaume Bourel a écrit :
Loïc Fejoz a écrit :
Hi,

I believe it works if you add oclAsType:
[let ac : AssociationClass = c.oclAsType(AssociationClass) ]

Thanks for the tip,

this syntax doesn't complains at build time but at runtime, there is a java exception from org.eclipse.acceleo.engine if "c" isn't an "AssociationClass" instance


Hi,

Obviously if you are not 100% sure that your object is an association class then surround the let with a conditional...

--
regards,
Loïc Fejoz