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

Bug 311045

Summary: Properties files cannot be used consistently
Product: [Modeling] Acceleo Reporter: Laurent Goubet <laurent.goubet>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: 3.0.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch fixing the properties issue none

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.