Adding enumerations to custom UML profiles

In UML models, enumerations are model elements that represent user-defined data types. Enumerations contain sets of named identifiers, called enumeration literals, that represent the values of the enumeration. Enumerations can represent primitive types, such as integer and Boolean types, or user-defined types. In a profile, you can specify an enumeration as the type for an attribute. For example, you can specify an enumeration called Days and an enumeration literal for each day of the week. You can then create an attribute called MyFavoriteDay of type Days and specify the enumeration literal called Saturday as the default value for the attribute.

Before you can add enumerations to a profile, the profile must be open in the Model Explorer view.

To add an enumeration to a custom UML profile:
  1. In the Model Explorer view, right-click a profile; then click Add UML > Enumeration.
  2. Type a name and press Enter.
  3. In the Model Explorer view, right-click an enumeration; then click Add UML > Enumeration Literal.
  4. Type a name for the enumeration literal and press Enter.
Related concepts
Custom UML profiles
Related reference
Stereotypes and constraints
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.