Parameter Substitution

Once a Template Binding (or other binding) relationship exists, you can add parameter substitutions to identify the formal parameters that are replaced, and the actual parameters that replace them, in the binding expression.

How to

To define a parameter substitution

Step

Action

1

Display the Binding tab, in the Template Binding connector Properties dialog.

The Target field identifies the target parameterized Class.

 

2

Click on the Add button below the Parameter Substitution(s) panel.

The next available row in the panel is enabled for editing, and the word <none> is displayed in the Formal column.

 

3

Click on the field and on the drop-down arrow that is now displayed.

A list of the template parameters from the target Class displays; click on the required parameter.

 

4

Click on the (  ...  ) button in the corresponding Actual field for the parameter.

If the template parameter:

Does not have a constraint, a short context menu displays offering the choice of typing a free-text value into the Actual field, or selecting a classifier from the Select Classifier dialog
Has a constraint defined, the Select Classifier dialog displays automatically, showing the available classifiers

 

5

Locate and select the required classifier to replace the parameter in the binding expression.

If you do not define an Actual classifier and the template parameter has a default value defined, that default is used in the expression.

 

6

To edit existing parameter substitutions, click on them and make the required changes as indicated in steps 3 and 4.

 

7

Click on the Apply and/or OK button.

The parameter substitutions display as a label underneath the connector.

 

Learn more