|
Re: Missing multiplicities in UML class diagrams [message #1722352 is a reply to message #1722279] |
Thu, 04 February 2016 09:21 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi,
Quote:It seems there is something missing in the *.notation files, but I wasn't able to figure out what. Is there a way to fix the diagrams?
Papyrus unfortunately doesn't provide a "repair diagrams" feature. The only workaround I can suggest is displaying the multiplicity in the "sourceRole" label (sourceRole and sourceMultiplicity are actually both able to display all the possible information about member ends, so it's just a matter of customization)
This can be done by using the following Stylesheet (CSS) rule:
Association > Label:sourceRole,
Association > Label:targetRole {
maskLabel: visibility name multiplicity derived;
}
Another option would be to remove all your associations and drop them again in the diagram... This would fix the diagram, but requires more effort...
A model-to-model transformation to add the missing labels to all your diagrams might also work. The transformation would look like this:
- Find all notation::Connector with type = "4001" owned by a notation::Diagram with type = "PapyrusUMLClassDiagram"
- For each, add two new notation::DecorationNode as children
- The first DecorationNode should have type="6033", the other one type="6034"
- For each of these DecorationNode, add a layoutConstraint (notation::Location). The 6033 one should have y=20 (Above the association), and the 6034 y=-20 (Under the association). x doesn't need to be set
HTH,
Camille
Camille Letavernier
|
|
|
|
Powered by
FUDForum. Page generated in 0.02232 seconds