Generators aims to build final Java classes:
{{tutorial:generator.png?500 |Generator}}
A **generator** transforms an **XML** file (see [[tutorial:scenario|scenario]]) in **java** classes.
For example, the generator org.adichatz.generator.PartTreeGenerator class can take a **ActorEDITORGENERATED.axml** file as input to generate 3 java classes:
- 'org.mycompany.myproject.ui.gencode.model.actor.ActorEDITOR'.\\
- 'org.mycompany.myproject.ui.gencode.model.actor.ActorEDITORPage1'.\\
- 'org.mycompany.myproject.ui.gencode.model.actor.ActorEDITORDependencies'.\\
In the same vein, org.adichatz.generator.QueryGenerator class, takes the **FilmQUERY** java class as input to build the 'org.mycompany.myproject.model.gencode.model.film.FilmQUERY' file.
\\ \\
You can create your own generator classes or select generator classes.
\\
You can create your own **generator** classes and decide to use them in generation process.:
* Create you generator class, e.g. by extending an existing generator.
* Open the './resources/xml/Scenario.xml' file with Scenario Editor.
* Select Features page.
* Select Generators tab.
* In the Outline part, focus on 'treeClassName' field 'and select available generators (CTL-Space).\\
{{tutorial:select_generator.png?550 |Select generator}}