In this tutorial we will explain how to apply a stereotype to an UML element. You can use existing profiles (a 'Standard' and 'Ecore' profiles are included) or create your own.
Import the Profile
-
First, you have to specify the different Profiles that you are going to use in your UML model : in the Outline, "Right Click > Load resource...". In the dialog window, choose the UML file that contains the expected
Profile and validate. The file should be added in the Outline, under the "Additional Resources" item of the tree : this item contains all the referenced Resources (Model or Profile files).
-
Then you have to apply this Profile to a given Package. Select the Package, "Right Click > Apply Profile" and select the Profile you have previously loaded. A new element (Profile Application) appears in your model as a
child of the Package : it is used to store the version of the Profile that has been applied.
-
Tip : you can directly apply a pre-existing profile ('Standard' or 'Ecore'). In fact you do not have to firstly reference the Profile file in the "Additional Resources" item. Select a Package element, "Right Click > Apply
Profile". The Profile will be automatically referenced.
Profile use : Apply a Stereotype
-
Now, you can add stereotype on elements that supports it. Always in the Outline, select an UML element, "Right Click > Apply Stereotype" : the available stereotypes are then displayed. Choose an existing one and validate.
The label of the element is then updated in the Outline and if the element is graphically present on a diagram, it is updated too (in general, the stereotype information is displayed before the name of the element).
Profile use : Unapply a Stereotype
- You can remove an applied stereotype on an UML element. Select the element, "Right Click > Unapply Stereotype" : the stereotypes that are applied to this element are displayed. Select those you want to remove and validate.
_______________________________________
By Jacques LESCOT, Anyware Technologies
August, 25 2006