Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311068 - Enable re-use of generators
Summary: Enable re-use of generators
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: All All
: P3 major
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-29 13:15 EDT by Laurent Goubet CLA
Modified: 2010-04-29 13:57 EDT (History)
0 users

See Also:


Attachments
Patch fixing the re-using issues (78.87 KB, patch)
2010-04-29 13:44 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 13:15:00 EDT
Acceleo generates an handy Java class to launch the evaluation of generation modules, wherein users can code the registration of specific ecore packages, resource factories, properties files, ...

However, a third-party generation module that wants to make use of another module, yet bypasses its Java file (by directly calling one of its templates) can not easily (without copy pasting) retrieve these specific registrations.

Likewise, these generated file have a lot of "noise" that clutters the file and makes changes risky (forces @generated NOT and thus prevents regeneration) and the API hardly readable.

We should have a common superclass to take care of the noise, usage of "super" would allow for the API to evolve if need be, and iterating over generation modules which we need to retrieve properties of would be eased by this common class.
Comment 1 Laurent Goubet CLA 2010-04-29 13:44:53 EDT
Created attachment 166535 [details]
Patch fixing the re-using issues

The attached patch introduces the new AbstractAcceleoGenerator class and changes the JET templates we use to generate our launchers to leverage that class as a superclass.

This will allow us to easily have the launching API evolve while letting our clients to both take advantage of these evolutions and have custom code in their launchers. Likewise, this superclass makes it easy for third party plugins to re-use properties and package registrations done by the module they want to call.
Comment 2 Laurent Goubet CLA 2010-04-29 13:57:58 EDT
This fix has been commited on HEAD and will be accessible in the M7 build.