Guidelines

What do I need to get started with Acceleo?

What do I need to get started with Acceleo?

The aim of this tutorial is to get you started with Acceleo by helping you create your first generation module. For the purpose of this tutorial, we will focus on creating an Acceleo module that generates Java beans from a UML model. You will need an “.uml” model as the input of the soon created generator.

Where do I find the Acceleo module file?

Right-click on the Acceleo module file (that is, the generate.mtl file) and select Run As > Launch Acceleo Application. The Acceleo launch configuration page opens, and you need to provide it with the sample model and target folder.

Is the Acceleo module used for text generation?

• The acceleo module can be used as an entry point for text generation if it contains a special comment This one! [comment @main /] Step 3: Running the Acceleo Converter • Now, selecting Run Configurations, a selection window appears You need to select the input model and the target directory Step 4: Debugging an Acceleo Module

How to create an Acceleo project in Eclipse?

Acceleo Projects are meant to provide you with facilities to write your Acceleo modules. In order to create a new Acceleo project, use the menu item File > New > Acceleo Project . Choose the name you want for your project (here, we’ll go for the me.mysoft.acceleo.sample ), then click Next> .

How to create an Acceleo module in Java?

This creates a new Acceleo Module file that contains a query (one per java method in your java class) whose role is just to delegate its behavior to the java class, thus making it accessible to your templates. This is simply achieved thanks to the non-standard “invoke“ Acceleo operation. You may want to rename parameters of the query.

How does Acceleo work in the Eclipse IDE?

Acceleo is deeply integrated in the Eclipse IDE with a full fledged editor with syntax highlighting, real time error detection, quick fixes, refactoring and much more. It also comes with dedicated views to help you navigate within your code generator and quickly access code generation design patterns.