Pattern instantiation

Pattern instantiation is the initial step of the apply pattern process and results in the creation of an instance of the pattern in a pattern's target model. The pattern instance element is identified by the keyword Pattern Instance.

Pattern application requires a target model and at least one pattern instance. Multiple instances of a pattern can exist at one time. Pattern instances are independent of one another, although they can share the same argument values. The pattern instance maintains the bind relationship with each pattern definition.

Pattern application begins when the pattern is dragged from the Pattern Explorer view to an element in a UML model or to the model's class or freeform diagram. Applying the pattern with the Apply Pattern wizard is another method of creating the pattern instance. The pattern instance always appears in the target model. Additionally, it appears on the diagram view if the pattern or its instance element in the model is dropped there. The instance is also added to the diagram if the checkbox is checked on the initial page of the apply pattern wizard. Dragging a pattern to the diagram view creates a new instance of the pattern. Dragging an existing pattern instance from the Project Explorer to the diagram view provides another way to see the same instance.

On the diagram view, the pattern instance element allows for easy binding of argument values using drag and drop gestures. The pattern instance contains the following information:

Options to modify or suppress display of these items are controlled by modifying the preferences in the Preferences window or by using the pop-up menus available by right-clicking an element or a blank area of the diagram view.


Feedback