Create a template

To create a text template:

  1. Click File > New > Text template.
  2. Type com.sodius.mdw.samples.tutorial/src in the Source folder field.
  3. Type tutorial.uml2relational in the Package field.
  4. Type GenerateSQL in the Name field.
  5. Click Finish.

The GenerateSQL text template is created and shows up in a template editor:

[#package tutorial.uml2relational]

[#template public GenerateSQL()]
[#file]file.txt[/#file]
generated text
[/#template]

This template uses a file directive to determine the file path in which the generated contents must be written out (e.g. file.txt). The code between the template directive start tag and end tag describes the text to be generated (e.g. generated text).

Related concepts
Text template