Generators aims to build final Java classes:

Generator

A generator transforms an XML file (see 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:

  1. 'org.mycompany.myproject.ui.gencode.model.actor.ActorEDITOR'.
  2. 'org.mycompany.myproject.ui.gencode.model.actor.ActorEDITORPage1'.
  3. '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).

Select generator

tutorial/generator.txt · Last modified: 2015/10/05 17:52 (external edit)