Sorting compartment items in UML diagrams

In UML diagrams, for diagram elements that have compartments, you can sort the compartment items to reduce the complexity or increase the level of abstraction in the diagram. In this context, sorting means putting the items in alphabetical order.
In compartments, you can sort attributes or operations by name, visibility style, or return type in ascending or descending alphabetical order. You can also filter compartment items and sort them at the same time.

To sort compartment items in a UML diagram:

  1. In the diagram editor, right-click a diagram element; then click Filters > Sort/Filter Compartment Items.
  2. In the Sort/Filter Compartment Items window, in the list on the left, select which compartment type to sort: Attribute or Operation.
  3. In the table on the right, click the appropriate column heading once to display the contents in ascending order. Click the column heading again to display the contents in descending order.
  4. Click Apply.
  5. Click OK.
Related tasks
Aligning elements in UML diagrams
Arranging elements in UML diagrams
Filtering compartment items in UML diagrams

Feedback