Creating a Template and a Generated File

GTL templates are commonly used for generating files. If your template is going to be used in generation, it must be referenced in a generated file.

  1. In the resource editor, right-click a metaclass in the Profile category, and select New > Template from the contextual menu.

    The convention is to name your templates using headless camelCase, (starting with a lowercase letter), in order to avoid clashes with property and collection names which, by convention use full CamelCase.

  2. Right-click the metaclass again, and select New > Generated File from the contextual menu.
  3. Insert the name of the template in the generated file between percent signs. For example:
    %myTemplate%