![]() |
![]() |
![]() |
![]() |
Creating a New Stereotype for All Rose Models Creating a New Stereotype for All Rose Models
To create a new stereotype and make it available in all models in Rose:
- 1 Close Rational Rose.
Note: Optionally, create icons for the stereotype to be used in diagrams, lists, and diagram toolboxes. Refer to Creating Stereotype Icons on page 185.
- 2 Open the default stereotype configuration file, DefaultStereotypes.ini.
- 3 In the stereotype configuration file, add a line for the new stereotype in the section called [Stereotyped Items]. For example, to add the class stereotype Controller to an existing configuration file, add a corresponding line as follows:
[Stereotyped Items]
Class:Model
Class:View
Class:Controller
- 4 Create a section for the new stereotype, named exactly as the line you added in the [Stereotyped Items] section, for example:
[Class:Controller]
Item=Class
Stereotype=Controller
- 5 If you have created a diagram icon for the stereotype, specify the name of that file (Metafile). Note that you can use an ampersand (&) instead of the folder of the stereotype configuration file. For example:
Metafile=&\MyStereotypeIcons\controller.emf
- 6 If you want to create a diagram toolbox button for this stereotype, specify the name of the file in which you created the corresponding small toolbox icon (SmallPaletteImages) and the location of the icon in that file (SmallPaletteIndex). You can also specify the name of the file in which the corresponding large toolbox icon is defined (MediumPaletteImages) and the location of the icon in that file (MediumPaletteIndex). For example:
SmallPaletteImages=&\MyStereotypeIcons\
small_palette_icons.bmp
SmallPaletteIndex=3
MediumPaletteImages=&\MyStereotypeIcons\
medium_palette_icons.bmp
MediumPaletteIndex=3
- 7 If you want to graphically display this stereotype in specification lists or in the browser, specify the name of the file in which you created its list icon (ListImages) and the location of the icon in that file (ListIndex). For example:
ListImages=&\MyStereotypeIcons\list_icons.bmp
ListIndex=2
- 8 Add any other setting needed to define the new stereotype. For a list of all available settings, information on the meaning of each setting, the possible values, and the default values, please refer to the "Stereotype Configuration File" topic in the online Help. Note, however, that you only have to include settings for which you want to assign values other than defaults.
- 9 Save your changes to the stereotype configuration file.
- 10 Run Rational Rose. View the log window to make sure there were no problems loading your icons.
- 11 If you created a diagram toolbox icon for the new stereotype, and want to add it as a button on a diagram toolbox, refer to Adding Stereotypes to the Diagram Toolbox on page 187.
The new stereotype is now available in Rational Rose. For information on how to control the display of the new stereotype in diagrams and in the browser, refer to Viewing Stereotypes on page 180.
Rational Software Corporation
http://www.rational.com support@rational.com docs@us.ibm.com Copyright © 1993-2000, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |