/ Home / HowTo / GenTextEditor / TemplateTab / TemplateSyntax

An LJCGenText "Template" is a text file with Template Directives and Replacement Names.

Directives

A Template Directive is contained within a single line comment. This allows the text file to be edited with the appropriate code editor regardless of the language type. The single line comment start characters can be specified by the user.

A directive starts with the "#" character and has up to three properties. These properties are: The directive ID, Name and optional Value. The directive ID is not case sensitive.

These are example Directives:
// #SectionBegin MySectionName
// #sectionend MySectionName

The available Directives are:

#SectionBegin - The beginning of a section.
#SectionEnd   - The end of a section.
#IfBegin      - The beginning of an If block.
#IfElse       - The beginning of an Else block.
#IfEnd        - The end of an If block.
#Value        - A replacement name for the parent section.

The "#Value" directive is used by the GenTextEdit program. It has no effect on the GenText program or generated code.

Replacement Names

Replacement names are placeholders for the values from the GenText Data xml file. Replacement names are case sensitive.

A Replacement name starts and ends with an underscore. No spaces are allowed in a replacement name or between the name and the enclosing underscore values. This is a replacement name: "_ClassName_".

/ Home / HowTo / GenTextEditor / TemplateTab / TemplateSyntax

Copyright © Lester J Clark and Contributors.
Licensed under the MIT License.