Jump to: navigation, search

Texo/Automatic Code Generation

< Texo
Revision as of 19:35, 17 May 2012 by Mtaal.elver.org (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Texo makes it possible to automatically generate code when you change a model file or annotations model file. This is done through the project properties.

Add Texo Nature

To edit the Texo project properties first you have to add the Texo nature to the project. To do this go through the following steps:

  • right click on the project
  • find the configure submenu
  • click on it and then click on 'add/remove Texo Nature'

Set project properties for Texo

Now you can edit the Texo project properties. Right click on the project and select properties (a bit down in the popup menu).

Then the project properties page appears. You will find the Texo project properties in the list on the left.


The automatic generation of source code is controlled by the settings in the lower part of the Texo properties. A description for each of the fields there:

  • Auto Generate Model Code: if this flag is not checked then you have to generate by right clicking on a model file. If this flag is checked then the source code is generated automatically when a model file is changed.
  • model folder: if the model folder is not set then any change in a model in the project will result in generation of model code, if this field is set then only changes done in model files in this folder (and its subfolders) result in code generation.
  • Generate DAO Classes: if checked then also the DAO classes are generated
  • Generate JPA Annotations: if checked then the generated model code will have JPA annotations.


If the code does not get generated automatically then there maybe something wrong with your model file. Right click on the model file and then choose validate, any errors are reported.