Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311045 - Properties files cannot be used consistently
Summary: Properties files cannot be used consistently
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: All All
: P3 critical
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-29 11:30 EDT by Laurent Goubet CLA
Modified: 2010-04-29 13:58 EDT (History)
0 users

See Also:


Attachments
Patch fixing the properties issue (55.72 KB, patch)
2010-04-29 11:45 EDT, Laurent Goubet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Goubet CLA 2010-04-29 11:30:30 EDT
When generation modules require properties files, they need to add the full path to this file in the generated launcher. Absolute paths can be used, which is unusable when sharing modules with other people/machines. Relative paths also cause issues if a third-party wants to call the module from another Java class.

Likewise, third-party generation modules with their own Java launcher, thus bypassing the original launcher, cannot re-use the properties files needed by the re-used module.
Comment 1 Laurent Goubet CLA 2010-04-29 11:45:28 EDT
Created attachment 166509 [details]
Patch fixing the properties issue

The attached patch changes the whole properties support to make use of the "ResourceBundle" Java provides (java.util.ResourceBundle) instead of the custom implementations Acceleo uses for now.

This breaks behavior as the generated launchers previously asked for a path (be it relative or absolute) to be returned from the "addProperties" method. This method now asks for the qualified name to the properties file.

For example, what previously was "platform:/plugin/bundle.id/package/to/properties/my.properties" is now "package.to.properties.my".
Comment 2 Laurent Goubet CLA 2010-04-29 13:58:28 EDT
This fix has been commited on HEAD and will be accessible in the M7 build.