Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329269 - Add properties when launching a generator
Summary: Add properties when launching a generator
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 12:04 EDT by Yvan Lussaud CLA
Modified: 2011-03-25 04:57 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.