Class diagram bugs/features

I started playing with the class diagram and found probably some bugs, and also would like to see some new features.

Bug: Association role is not displayed

Create two classes, connect them with an association, change the name for both ends. One end is displayed on the diagram, the other is not. Interestingly, multiplicity is displayed, but not the name.

Bug: Association name is not displayed

Create two classes, connect them with an association, give it a new name. It is not displayed on the diagram.

Bug: Line routing is displayed for class

Select a class. The top toolbar changes according to the things that are relevant to the class. However, the line routing is also displayed but it does not make any sense, because it is all grayed out.

Feature request: ability to change name/multiplicity for association

It is so very painful to go into the properties, scroll down, find the element, set the multiplicity one by one. Idea: add this to the context menu (right mouse click) for both ends of the assocation with default values (1, 1…*, *, etc.)

Feature request: when a new class is created, allow direct name edit

When a new class is created it is given a default name. I have to press F2 and rename it. It should happen either automatically or should be configurable.

Feature request: render small triangle for associations like in UML
Enabling the rendering a small triangle in the direction of an association, just like in UML.

Hi Zsolt,

Please find a few answers below.

Bug: Association role is not displayed → It can be displayed by changing the filters on the diagram: make sure you left-click on the back of the diagram so that the top toolbar has the filter displayed, and select “Show Modifiers”

Bug: Association name is not displayed → Same as previous point but unselect “Hide Associations Labels”

Feature request: ability to change name/multiplicity for association → Just a hint here: double-click on the association, it will pop-up the property view, the edition is a little bit easier from here.

Feature request: render small triangle for associations like in UML → I am not sure I understand this one, Inheritance have a small triangle, association have an arrow, can you clarify?

Stephane

Hello,

Bug: Assocation labels are not displayed

I tried to set the Show Modifiers and Hide Associations (found it), but does not work, even if I change the settings. Capella 6.1.0, Build id: 202303291413, Windows 11

When closing and reopening a diagram, the association label is displayed. So I think this is definitely a bug. I built a Capella from Git (checked out the main branch today) and the problem is still there.

Working: Role is not displayed

The name of the role is displayed only on one side.

The solution is to set that part to navigable, resulting the role to be displayed. It totally makes sense, but it’s not trivial.

Feature request: Render small triangle

I was thinking about the following:

image

I for got to mention that when changing the filters, you should do a diagram refresh. This is what’s happening when you close and reopen the diagram (refreshing).

Stephane

Ok - I am certainly not an expert with UML and the Class diagram, so excuse me if I am asking dumb question here. So question: I think in Capella the only way you can have an association like this (no arrows on any end of the line) is by making both ends “Not Navigalbe”. On wich semantic information should we rely then to know in which direction should the triangle go?

Found the corresponding UML specification part:

UML specification versio 2.5.1 (https://www.omg.org/spec/UML/2.5.1/PDF)

Chapter 11.5.4 Notation for the description and also check page 720 Association/Connector/InstanceSpecification, kind=Triangle

On a binary Association drawn as a solid line, a solid triangular arrowhead next to or in place of the name of the Association and pointing along the line in the direction of one end indicates that end to be the last in the order of the ends of the Association. The arrow indicates that the Association is to be read as associating the end away from the direction of the arrow with the end to which the arrow is pointing (see Figure 11.27). This notation is for documentation purposes only and has no general semantic interpretation. It is used to capture some application-specific detail of the relationship between the associated Classifiers.

So if it has no semantic meaning, I still wonder how the tool is supposed to guess the direction of the triangle…

For every connection there is a source and a target, and it is pointing from the direction of the source to the target.

I slept on it and maybe what I really need not a class diagram, but an ontology/conceptual model diagram, that is on a higher level and working with high level concepts. We use the conceptual diagram basically all the time and I wanted to reuse the existing class diagram in Capella, but maybe this is not a correct way. From a conceptual model/ontology diagram we could make a transition to Data/Class diagram on logical level for sure.

Just a comment: the original objective of Class Diagrams in Capella was not to be fully compliant with UML … :wink:

By the way, I would NOT have named them “Class Diagram Blank”!!
I rather suggest [DMB] Data Modeling Blank diagrams…

I quickly looked at the Capella meta-model and I don’t think this is the case, the Association have membersEnds, not a source and a target. And looking at the UML meta-model, it looks the same (11.5.2) but I may be wrong.
The “Figure 11.27” that they point to in the explanation you mentioned does make sense to me as the association is navigable and the filled triangle on the association name points in the same direction as the line arrow.

Anyway, as you were saying that you slept on it and maybe were not looking to a class diagram but more an ontology/conceptual model diagram, I am not sure where you stand on the different requests you made on this thread and the answers I provided.
As Pascal was saying, the Class diagram in Capella does not intend to implement the UML Class diagram and could indeed be renamed “Data Modeling Blank diagrams”.
Having said that, I am not sure there is a better diagram than this one for modeling an ontology/conceptual model diagram in Capella…

Stephane

Thanks for all the answers.

I would say there should be a bug ticket for the need to reload the diagram, the diagram refresh should happen automatically when changing a modifier (show modifier, hide associations, etc.). I understand it works this way however in my opinion it is not an expected behavior from user point of view. Would you create the bug ticket or should I?

Yeah I was a little bit surprised with this behaviour, let me dig a little bit into this to find out if this is a bug of if I am missing something.

ok please raise a bug ticket Zsolt. The application of filter should display the result (default Sirius behaviour) but there may be some post-refresh treatments that create this behaviour. Let’s find out what the Capella dev team thinks of this.