Configuring Stereotypes And tagged Value - Visual Paradigm
Configuring Stereotypes And tagged Value - Visual Paradigm Configuring Stereotypes And tagged Value - Visual Paradigm
B Configuring Stereotypes And tagged Value
- Page 2 and 3: SDE-VS User’s Guide (Part 1) Appe
- Page 4 and 5: SDE-VS User’s Guide (Part 1) Appe
- Page 6 and 7: SDE-VS User’s Guide (Part 1) Appe
- Page 8 and 9: SDE-VS User’s Guide (Part 1) Appe
- Page 10 and 11: SDE-VS User’s Guide (Part 1) Appe
- Page 12 and 13: SDE-VS User’s Guide (Part 1) Appe
- Page 14: SDE-VS User’s Guide (Part 1) Appe
B<br />
<strong>Configuring</strong> <strong>Stereotypes</strong><br />
<strong>And</strong> <strong>tagged</strong> <strong>Value</strong>
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> Sterotypes and Tagged <strong>Value</strong><br />
Appendix B - <strong>Configuring</strong> <strong>Stereotypes</strong> and<br />
Tagged <strong>Value</strong><br />
This chapter explains in detail how to apply <strong>Stereotypes</strong> and Tagged <strong>Value</strong> to categorize model elements.<br />
Introduction<br />
<strong>Stereotypes</strong> allow you to categorize different kinds of model elements. It may specify additional constraints and tag definitions<br />
for the models, and also be used to indicate a difference in meaning or usage between two model elements with an identical<br />
structure. An icon or formatting (fill, line and font) can be specified to a stereotype to present the elements that apply to that<br />
stereotype.<br />
We know that everything in UML contains its own properties. Tagged values let you add properties for specifying keywordvalue<br />
pairs of model elements. You can define tags that apply to a model element or a stereotype.<br />
Adding Stereotype to a Model Element<br />
Figure B.1 - Class with <strong>Stereotypes</strong><br />
To add stereotype for a model element:<br />
B-2<br />
1. Select the desired model element from the diagram.<br />
2. Right-click on the selection and choose <strong>Stereotypes</strong> > <strong>Stereotypes</strong>...from the popup menu.<br />
Figure B.2 - Select Stereotype in popup menu<br />
3. This displays the <strong>Stereotypes</strong> page of the Class Specification dialog box.<br />
Figure B.3 - Class specification dialog (stereotypes)
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
4. Select a stereotype listed under the All list.<br />
5. Press > to assign the stereotype to the model element.<br />
To assign multiple stereotypes to a model element, press on the Ctrl key and select the desired stereotypes<br />
and press >> to assign them to the model element.<br />
6. Press OK to apply the setting.<br />
<strong>Configuring</strong> <strong>Stereotypes</strong><br />
Apart from using existing stereotypes, you can create new stereotypes to suit your need. Similarly, you can edit stereotypes to<br />
change their properties and appearance in a diagram. To configure stereotypes, you must first display the Configure<br />
<strong>Stereotypes</strong> dialog box. Select from main menu Tools > Configure <strong>Stereotypes</strong>...to display the dialog box.<br />
Figure B.4 - Configure <strong>Stereotypes</strong> dialog<br />
Command Description<br />
Add<br />
Edit<br />
Allows you to create a new stereotype for a particular model element by displaying the Stereotype Specification<br />
dialog box of the new stereotype. Fill in the details of the new stereotype from that dialog box and confirm the<br />
changes to create a new stereotype.<br />
Allows you to edit an existing stereotype by displaying the Stereotype Specification dialog box of the selected<br />
stereotype. Fill in the details of the stereotype from that dialog box and confirm the changes to edit the properties<br />
of the stereotype..<br />
Remove Remove a stereotype available to a particular model element.<br />
OK Close the dialog box by committing all changes made.<br />
Cancel Close the dialog box without saving any changes made.<br />
Help Display the Help content of the Configure <strong>Stereotypes</strong> dialog box.<br />
Creating a New Stereotype<br />
To create a new stereotype:<br />
Table B.1<br />
1. Displays the Configure <strong>Stereotypes</strong> dialog box.<br />
2. Select the model element for which the new stereotype is to be available to.<br />
B-3
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
B-4<br />
Figure B.5 - Model Elements<br />
3. Press on the Add...button. This displays the Stereotype Specification dialog box for specifying the details of the new<br />
stereotype.<br />
Figure B.6 - <strong>Stereotypes</strong> Specification dialog<br />
4. Specify the details of the stereotype such as its name, documentation and its icon. (For more details on the use of<br />
Stereotype Specification dialog box, please refer to the following section in this chapter)<br />
5. Click OK to confirm the changes.<br />
The new stereotype is now available to the selected model element.<br />
Figure B.7 - User defined stereotypes<br />
Editing a Stereotype<br />
To edit a stereotype:<br />
Figure B.8 - Modify stereotype
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
1. Display the Configure <strong>Stereotypes</strong> dialog box.<br />
2. Select a stereotype from the <strong>Stereotypes</strong> list for editing. The stereotype can be a predefined one or one defined by you.<br />
Figure B.9 - Select stereotype from the Stereotype list<br />
3. Press on the Edit...button. This displays the Stereotype Specification dialog box for specifying the details of the new<br />
stereotype.<br />
Figure B.10 - Edit Stereotype<br />
4. Specify the details of the stereotype such as its name, documentation and its icon. (For more details on the use of<br />
Stereotype Specification dialog box, please refer to the following section in this chapter)<br />
5. Click OK to confirm the changes.<br />
If the stereotype is in use by a model element, the appearance of that stereotype needs to be refreshed by pressing OK from the<br />
Configure <strong>Stereotypes</strong> dialog box in order to commit the changes made.<br />
Using the Stereotype Specification Dialog Box<br />
When creating or editing a stereotype you will come across the Stereotype Specification dialog box.<br />
B-5
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
B-6<br />
Figure B.11 - Stereotype specification dialog<br />
Field Description<br />
Name The name of the stereotype.<br />
Icon Path<br />
Fill, Line, Font<br />
An image assigned to this stereotype. Click ...to select the path of the image, or click to discard the icon.<br />
To specify the appearance of the stereotyped shapes. Their usages will be described in detail in the Stereotype<br />
Formats section later in this chapter.<br />
Documentation The description or any information relevant to the stereotype.<br />
Abstract To specify the stereotype as abstract.<br />
Leaf To specify the stereotype as leaf.<br />
Root To specify the stereotype as root.<br />
Reset Reset all changes made.<br />
OK Close the dialog box by committing all changes made.<br />
Cancel Close the dialog box without saving any changes made.<br />
Apply Committing all changes made.<br />
Help Display the Help content of <strong>Stereotypes</strong> Specification dialog box.<br />
Adding Tagged <strong>Value</strong> to a Stereotype<br />
To add Tagged <strong>Value</strong> definitions to a stereotype:<br />
Table B.2<br />
1. Select Tools > Configure <strong>Stereotypes</strong>...from main menu. This displays the Configure <strong>Stereotypes</strong> dialog box.<br />
2. Select the desired stereotype and click Edit...<br />
Figure B.12 - Press Edit button to open Stereotype specification<br />
3. The Stereotype Specification dialog box is displayed. Switch to the Tagged <strong>Value</strong> Definitions tab.
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
Figure B.13 - Tagged value definitions<br />
4. Click Add. This displays two kind of tags for selection, Text or Model Element. Click on the desired one.<br />
Figure B.14 - Tag options<br />
Adding Text Tag to stereotypes<br />
From the Stereotype Specification dialog box, press Add and then select Text Tag from the popup menu.<br />
Figure B.15 - Add Text tag<br />
This displays a new Tag entry.<br />
Figure B.16 - A new text tag entry<br />
To change the name of the Tag, double click to the Name field and enter a new name.<br />
Figure B.17 - Rename the tag<br />
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type<br />
from the popup menu.<br />
Figure B.18 - Change the type of tag<br />
B-7
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
To specify a default value of the Tag, double click to the Default <strong>Value</strong> field and enter a value.<br />
Figure B.19 - Enter the value<br />
Adding Model Element Tag to a stereotype<br />
From the Stereotype Specification dialog box, press Add and then select Model Element Tag from the popup menu.<br />
Figure B.20 - Add Model Element Tag<br />
This displays a new Tag entry.<br />
B-8<br />
Figure B.21 - A new model element tag<br />
To change the name of the Tag, double click to the Name field and enter a new name.<br />
Figure B.22 - Rename the model element tag<br />
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type<br />
from the popup menu.<br />
Figure B.23 - Change the type of tag<br />
To specify a default value of the Tag, double click to the Default <strong>Value</strong> field and enter a value.<br />
Figure B.24 - Enter the value of tag<br />
Adding Tagged <strong>Value</strong> to a Model Element<br />
To add Tagged <strong>Value</strong> definitions to a model element:<br />
1. Right-click on a model element and select Open Specification...from the popup menu.<br />
Figure B.25 - Open specification
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
2. The specification dialog box is displayed. Switch to the Tagged <strong>Value</strong> Definitions tab.<br />
Figure B.26 - Actor Specification dialog<br />
3. Click Add. This displays two kind of tag for selection. One is Text Tag and another is Model Element Tag. Click on<br />
the desired one.<br />
Figure B.27 - Add Tag options<br />
Adding Text Tag to Model Element<br />
From the Stereotype Specification dialog box, press Add and then select Text Tag from the popup menu.<br />
Figure B.28 - Add text tag<br />
This displays a new Tag entry.<br />
Figure B.29 - The new text tag<br />
To change the name of the Tag, double click to the Name field and enter a new name.<br />
Figure B.30 - The name of tag<br />
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type<br />
from the popup menu.<br />
B-9
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
Figure B.31 - the type of tag<br />
To specify a default value of the Tag, double click to the <strong>Value</strong> field and enter a value.<br />
Figure B.32 - The value of tag<br />
Adding Model Element Tag to a Model Element<br />
From the Stereotype Specification dialog box, press Add and then select Model Element Tag from the popup menu.<br />
Figure B.33 - Add Model element Tag<br />
This displays a new Tag entry.<br />
B-10<br />
Figure B.34 - The blank new model element tag<br />
To change the name of the Tag, double click to the Name field and enter a new name.<br />
Figure B.35 - The name of tag<br />
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type<br />
from the popup menu.<br />
Figure B.36 - The type of tag<br />
To specify a default value of the Tag, double click to the <strong>Value</strong> field and enter a value.<br />
Figure B.37 - The tag value
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
Stereotype Formats<br />
You can configure the formats of stereotypes including fill, line and font, so that stereotyped elements can be easily<br />
distinguished and emphasized in the diagram.<br />
<strong>Configuring</strong> Stereotype Formats<br />
1. To configure stereotype formats, select menu Tools > Configure <strong>Stereotypes</strong>....<br />
2. In the Configure <strong>Stereotypes</strong> dialog box, select a model type in Model elements and the target stereotype in<br />
<strong>Stereotypes</strong>. Click the Edit... button.<br />
Figure B.38 - Configure Stereotype dialog<br />
3. The Stereotype Specification is shown.<br />
Figure B.39 - Stereotype Specification dialog<br />
B-11
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
Applying Fill Color<br />
B-12<br />
1. To apply fill color to stereotype, select the Use checkbox and click the ... button of the Fill property.<br />
Figure B.40 - Edit fill of stereotype<br />
2. Select a fill color in the Format Fill dialog box and click OK.<br />
Applying Line Style<br />
Figure B.41 - Format Fill dialog<br />
1. To apply line style to stereotype, select the Use checkbox and click the ... button of the Line property.<br />
Figure B.42 - Edit line of stereotype<br />
2. Configure the line style in the Format Line dialog box and click OK.
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
Applying Font<br />
Figure B.43 - Format Line dialog<br />
1. To apply font to stereotype, select the Use checkbox and click the ... button of the Font property.<br />
Figure B.44 - edit Font<br />
2. Select a font in the Select Font dialog box and click OK.<br />
Figure B.45 - Select Font dialog<br />
After setting a stereotype to a shape, the formats of the stereotype will be applied to the shape immediately.<br />
Figure B.46 - The Modified stereotype<br />
B-13
SDE-VS User’s Guide (Part 1) Appendix B – <strong>Configuring</strong> <strong>Stereotypes</strong> and Tagged Vale<br />
Changing Stereotype Formats<br />
B-14<br />
1. Just like configuring stereotype formats, open the 'Configure <strong>Stereotypes</strong>' dialog box and select a model type in<br />
Model elements and the target stereotype in <strong>Stereotypes</strong>. Click the Edit... button to edit its fill, line and font in the<br />
Stereotype Specification.<br />
Figure B.47 - Edit the format of stereotype<br />
2. After changing stereotype formats, it is important that you ensure the 'Apply changes to stereotypes in current<br />
project' option is selected, otherwise the stereotypes used in the current project will not be updated.<br />
Figure B.48 - apply the change to current project<br />
3. The appearances of shapes assigned to the changed stereotype are updated.<br />
Figure B.49 - Model style updated