|
Re: [Acceleo 3] properties files [message #541733 is a reply to message #541719] |
Tue, 22 June 2010 11:07 |
|
This is a multi-part message in MIME format.
--------------030007010206010802060407
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
Without knowing what you did or how "it failed", I can't give you much
more help than what already is in the online help :
- your properties file must be in a source folder (say it is in package
"com.serli" and it is named "test.properties")
- you have to return its qualified name in the list of Strings returned
by the method "getProperties" of the generated Java launcher for your
mtl. With this example, the String you have to return would be
"com.serli.test"
If these don't help, I'll need more information as to what you did, what
you're trying to do, how you don't manage to do it.
Laurent Goubet
Obeo
evariste.konkole@serli.com wrote:
> I'm trying to use properties file with Acceleo3.0. I followed the help
> guide but i was not able to make it work.
> Please, someone can give me more details about it?
--------------030007010206010802060407
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=
--------------030007010206010802060407--
|
|
|
|
Re: [Acceleo 3] properties files [message #541924 is a reply to message #541749] |
Wed, 23 June 2010 07:51 |
|
This is a multi-part message in MIME format.
--------------040806050202010509030600
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
The "propertiesFiles" field is deprecated and no longer in use. You
should return the String yourself from your implementation of
getProperties :
public List<String> getProperties() {
List<String> properties = super.getProperties(); <= 'super' doesn't do
anything other than creating an empty list, so this is not mandatory
properties.add("com.serli.default");
return properties;
}
However, a call to "getProperty" should never return a invalid result
such as you have there : a "not found" property should simply return
null. Which build of Acceleo are you using?
.... Come to think of it ... if the "propertiesFiles" field of your
generated java launcher is _not_ deprecated then you are using an older
version of Acceleo, one where the properties files weren't properly handled.
Laurent Goubet
Obeo
evariste.konkole@serli.com wrote:
> what i've done is:
> - i add default.properties file in package com.serli. this file contains
> a key name 'path'
> - then i modify getProperties method by adding this line
> propertiesFiles.add("com.serli.default"); - finally, in my module i use
> getProperty('path') to get the value of the key. I obtain this result
> mailto:org.eclipse.emf.ecore.impl.DynamicEObjectImpl@14d5067 (eClass:
> mailto:org.eclipse.emf.ecore.impl.EClassImpl@d9a624 (name:
> Invalid_Class) (instanceClassName: null) (abstract: false, interface:
> false))
--------------040806050202010509030600
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=
--------------040806050202010509030600--
|
|
|
Powered by
FUDForum. Page generated in 0.04201 seconds