IDE & Navigation
Properties & Tools
Tokens are similar to macros. They are replaced at runtime with the predefined values. There are system tokens like “curStateID”, “curTransID”, etc.
You can also define your own tokens. This is done through the token.properties file in “config/” folder.
The custom tokens are defined with a “code”=“value” pair, typically one line per token.
Custom tokens must be referenced with a prefix “@” symbol.
For example the following line defines a “msg_FieldMissing” to a static string:
msg_FieldMissing=Missing field detected.
You then use this in mScript:
<if value1="$isVisible('myField')" op="ne" value2="true"> <log msg="Error: [@msg_FieldMissing] - myField "/> </if>
Usually each token is defined in the token.properties file in one line. However, if you want to span the token definition over multiple lines for better readability, you can do so by ending each intermediate lines with back-slash char “\”.
myToken=line1 \ line2 \ last line
Regardless of multiple lines, they are concatenate together into a single one line text when the token is used with white spaces removed.