Skip to content

The templates

srizzo edited this page Sep 13, 2010 · 3 revisions

The templates are the actual code that will be generated.

For better organization, group your templates on the “templates” folder of your generator

Ex:.

yourProject
    |--generators
        |-- Your Generator.generator
            |-- templates
                |-- SomeTemplate.java.ftl
                |-- AnotherTemplate.java.ftl

The user entered params can be acessed by your template:

#yourProject/generators/Your Generator/templates/SomeTemplate.txt.ftl

hello ${param1}!!!

Each template will then be processed by the template engine indicated by its file extensions.

The destination for each template is indicated on the templates configuration file.

Clone this wiki locally