Add Enumeration Elements

Enumerations can be used to restrict the values available to stereotype tags.



Enumerations defined under a Profile Package do not appear as elements in the profile when imported.

To add an Enumeration element, follow the steps below:

  1. Open your Profile Package child Class diagram.
  2. In the Toolbox, select More tools | Profile. The contents of the Profile page of the Toolbox display.
  3. Drag an Enumeration item from the toolbox onto the diagram. If the Properties dialog does not display, double-click on the element on the diagram.
  4. In the Name field, type the name of the new Enumeration.
  5. Click on the Details tab and click on the Attributes button. The Attributes Properties dialog displays.
  6. In the Name field, type the name of the Enumeration attribute.
  7. In the Type field, click on the drop-down arrow and select the appropriate type.
  8. In the Initial field, type the initial value of the attribute.
  9. Click on the Save button, and repeat steps 6 to 9 for additional attributes.
  10. When you are finished, click on the Close button.
  11. Right-click on the Stereotype element and select the Attributes context menu option. The Attribute Properties dialog displays for the stereotype.
  12. In the Name field type a name for the attribute.
  13. In the Type field type the name of the Enumeration element.
  14. In the Initial field type the name of the first enumeration attribute you defined.
  15. Click on the Save and Close buttons.

You have now generated a drop-down list for setting the value of the tag in the Tagged Values window.