Unbinding pattern arguments

You can remove the binding relationship between a pattern instance and an argument. Some modifications resulting from the pattern application can remain in the model depending on the pattern design.

About this task

When the binding is removed, the pattern checks and adjusts for any dependencies between other parameters in the pattern.

You may want to remove the binding to some elements in a pattern so that you can specify new arguments and reapply the pattern. For example, in the Delegation pattern you can apply the pattern the first time and obtain the results shown in the following screen capture.

The Delegate pattern and its class and interface arguments.

Next, you can remove the binding to the Delegator class, and then specify another class as an argument.
The Delegate pattern inteface argument with realtionships to two classes.
The original interface relationships are maintained with the first class and added to the new class.
Note: In this pattern, the author could have supplied the appropriate code in the pattern expansion_remove method to remove the original interface relationships. Not all patterns will have the same behavior.

Procedure

To unbind a bound pattern argument, in the Project Explorer view, expand the pattern instance, right-click a binding relationship and click Delete from model.

Project Explorer selection of bound argument to be deleted.

Note:

You can unbind a pattern in the diagram editor by clicking the argument name or argument value in the parameter cell of a pattern instance, and clicking Patterns > Unbind Argument.


Feedback