|
Re: [Acceleo] Properties [message #537489 is a reply to message #537473] |
Wed, 02 June 2010 15:29 |
|
This is a multi-part message in MIME format.
--------------020500010504050201000303
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Daniel,
[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
adapt types).
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 ^^.
Laurent Goubet
Obeo
Daniel wrote:
> 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
> generated:
>
> [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
> gen.constructor=true
>
> Should I copy-paste it and thats all or should I do any other thing to
> get it work?
>
> Thank you very much.
--------------020500010504050201000303
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------020500010504050201000303--
|
|
|
|
Powered by
FUDForum. Page generated in 0.03483 seconds