Placeholders

Placeholders represent a return type, a declaring class, or a method argument. Placeholders can be filled automatically or manually depending on the placeholder type.

Vocabulary phrase templates contain placeholders. Placeholders represent gaps in phrases that can be filled in either automatically or manually when editing rules. Placeholders are identified by curly brackets {}.

There are three types of placeholder:

  • Subject placeholders, which are completed automatically

  • {this} placeholders, which you complete manually when editing rules

  • Argument placeholders, which represent the arguments of a method, and which you complete manually when editing rules

To set a different text for an argument placeholder, use the syntax {x, "my text"} in the phrase template.

Subject placeholder

Subject placeholders are shown in navigation phrases. The subject is a business term that you can edit in the BOM Editor. The subject corresponds to the return type of a member.

The subject placeholder is optional. When used in rules, the subject placeholder automatically takes the appropriate number and article for the context. In the placeholder text, the subject needs to be specified by using the singular form, without article.

{this} placeholder

The {this} placeholder represents the declaring class of a member. You cannot use this placeholder in the verbalization of static members.

For example, for an attribute lastName of type String in class Customer, you can specify the following phrase template:

{last name} of {this}

If there is no ambiguity, you can write simplified phrase templates by not using the {this} placeholder. See Simplified phrase templates.

Argument placeholder

Argument placeholders represent the arguments of methods. They are represented by the index of the argument.

For example, the action phrase in {this}, display the message {0} is the verbalization of the method Session.displayMessage(String). {0} is the argument placeholder for a String.

Argument placeholder