Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329269

Summary: Add properties when launching a generator
Product: [Modeling] Acceleo Reporter: Yvan Lussaud <yvan.lussaud>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: stephane.begaudeau
Version: 3.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Yvan Lussaud CLA 2010-11-02 12:04:12 EDT
In my generator I use getProperty(). As a module developper I only care about the key part of the property.

When I want to launch my generation I'm unable to add the given properties using the generated class. I'm launching the generator in standalone mode from a Junit 4 test suite.

I need to add a (key, value) or to tell where to fine the appropriate property file.

regards,
Yvan.
Comment 1 Stephane Begaudeau CLA 2011-03-25 04:57:29 EDT
The changes to the properties files loading system now allow you to override "getPropertiesLoaderService(AcceleoService acceleoService)" in the Java launcher class generated by Acceleo. By overriding this method you can load your properties files by yourself or you can even programmatically add properties. Have a look at org.eclipse.acceleo.engine.service.properties.BundleAcceleoPropertiesLoaderService for example to see an example of a properties loader service that will look into the current bundle to find the properties files.