Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Contents |
Prev | Next |
Literal Text
All text within a given template that is not part of a macro or a variable definition/reference, is considered literal text. With the exception of blank lines, which are ignored, literal text is directly substituted from the template into the generated code.
Consider this excerpt from the Java Class Declaration template:
$bases = "Base"
class % className % $bases
On the final line, the word 'class ', including the subsequent space, would be treated as literal text and thus for a Class named 'foo' would return the output:
class fooBase
A blank line following the variable $bases would have no effect on the output.
Inserting System Characters:
The %, $, " and \ characters have special meaning in the template syntax and cannot always be used as literal text. If these characters must be generated from within the templates, they can be safely reproduced using these direct substitution macros:
Macro |
Action |
---|---|
%dl% |
Produce a literal $ character. |
%pc% |
Produce a literal % character. |
%qt% |
Produce a literal " character. |
%sl% |
Produce a literal \ character |
Notes
String conjunction operators (“+”, “+=”) are not required but can be used
Learn more