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

Bug 311068

Summary: Enable re-use of generators
Product: [Modeling] Acceleo Reporter: Laurent Goubet <laurent.goubet>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.0.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch fixing the re-using issues none

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.