Acceleo Tutorial

Authors: Laurent Goubet
Contact: laurent.goubet@obeo.fr

Copyright © 2008, 2010 Obeo™.

New Acceleo UI project

Once your templates are ready, you may want to have some wizards to launch the generation from within Eclipse. You can use the ant tasks or the java code, but you can also use the New Acceleo UI project wizard. This wizard will create a new Eclipse ui project which will allow the user to launch the generation with a right-click action.

The example below shows the default result of this plugin, a Generate Sample action on the .uml files.

../images/new_acceleo_module_ui_project_result.png

First, right click on the Acceleo generator project then New->Acceleo UI Launcher Project.

../images/new_acceleo_module_ui_project.png

Choose the desired plugin name for this project, then click next.

../images/new_acceleo_module_ui_project_1.png

Choose the generator project as referenced project, then click next.

../images/new_acceleo_module_ui_project_2.png

Finally, enter the model filename filter (files for which the generation action must be proposed), and the java code for the target folder.

../images/new_acceleo_module_ui_project_3.png

The wizard will create a new plugin with all the necessary code to have a new action for the selected model file that will generate code in the specified folder.