|Re: [Acceleo] Properties [message #537489 is a reply to message #537473]
||Wed, 02 June 2010 15:29
| Laurent Goubet
Registered: July 2009
This is a multi-part message in MIME format.|
Content-Type: text/plain; charset=UTF-8; format=flowed
[if (getProperty('gen.constructor') = true)] will not work out of the
box : properties are Strings, so you should have
"getProperty('gen.constructor') = 'true'" instead (we no longer try and
Other than that, the properties system is still present in Acceleo 3.0,
but it is more organized than it was in Acceleo 2. You now need to
explicitely tell Acceleo which properties files it should use, and
that's done through the generated Java launcher. Please see the
documentation of the "getProperties()" method of the launcher, or in the
provided documentation : Help => Help Contents ; go into "Acceleo Model
To Text" and open the User Guide. Documentation of the properties usage
is in the section "Customizing Acceleo Generations With Properties".
This should do the trick ^^.
> Hi, I am trying to migrate the UML2java module to Acceleo 3.0.0.
> I used the mt2mtl feature and I have seen that it doesnt import the
> properties files, for example, in a template called class.mtl it has
> [if (getProperty('gen.constructor') = true)]
> And I know that refers to a file named default.properties in which I
> found the following
> # Generate default constructor
> Should I copy-paste it and thats all or should I do any other thing to
> get it work?
> Thank you very much.
Content-Type: text/x-vcard; charset=utf-8;
Powered by FUDForum
. Page generated in 0.01930 seconds