Evolution #56

Display uniqueness and order designators in class diagram

Added by Michaël Piffret over 7 years ago. Updated over 7 years ago.

Status:AssignedStart date:15 May 2012
Priority:MediumDue date:
Assignee:Cédric Marin% Done:


Target version:-


For attributes and association ends, UML (as of superstructure 2.4.1) defines that multiplicity presentation includes uniqueness and order designators, as in the following exemple :

purchase : Purchase [*] {ordered, unique}

Currently in Modelio the only way to know if an attribute is unique is to look at the Element tab, usually by scrolling down the list. All other attributes seem properly rendered (class, derived, abstract).

Cf. UML 2.4.1 Superstructure, §7.3.33 and Figure 7.61


#1 Updated by Michaël Piffret over 7 years ago

UML defines several specializations for MultiplicityElement, like Parameter (for Operations) and StructureFeatures (Attributes, AssociationEnds), but also Pins and some others… Uniqueness is also defined for more elements (operation return type, etc).

My request was specifically for Attributes and AssociationEnds. The following bit of code could be added in several places as a “quick and dirty” change, without refactoring the multiplicity handling : `

if (theElement.isUnique() && theElement.isOrdered()) {
    output.append("{ordered, unique}");
else if (theElement.isUnique()) {
else if (theElement.isOrdered()) {
} // no other case


I have found GmAttribute.getAttributeMultiplicity() , GmOperation.getParameterCard() and GmRoleCardinalityLabel.computeLabel() as candidates for this change, renaming the parameter “theElement” and the StringBuffer “output” accordingly. I looked for all usages of a getMultiplicityMin method in Eclipse, which is rudimentary but I didn’t know what else to do.

If you prefer a SVN patch derived from the latest published source code archive, please tell me.

#2 Updated by Christophe Demeulemeester over 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Cédric Marin

Also available in: Atom PDF