A modeling tool provides the ability to create a stereotype, which uses different icons depending on a stereotype “kind." For example, PseudoState can be represented by different notations that depend on PseudoStateKind.


To apply different icons on the same stereotype


  1. Create an Enumeration (in our example, supercarKind) to define all stereotype “kinds."
  2. Apply the «iconHolder» stereotype to the enumeration.
  3. Create as many EnumerationLiterals of as many different kinds as you need (in our example, it is “ferrari” and “audi”).
  4. Apply stereotypes with different icons to every EnumerationLiteral (in our example, «ferrari» and «audi»).
  5. Create a Stereotype (in our example, supercar) with a property (tag definition), with type enumeration (supercarKind). You could also select a default value.
  6. Assign the created stereotype to an element and select one of the enumeration values in tags. A stereotyped element will change its icon to the enumeration value. 

Example of applying icons.
Related Pages