Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: mariop on September 27, 2022, 07:37:47 pm

Title: Attribute details not visible in class diagram (EA v16)
Post by: mariop on September 27, 2022, 07:37:47 pm
Hi,

I am doing some comparison between models in current EA version (14) and migrated ones to new v16 and found class diagram which displays no attribute types in diagram, although "Show Attribute Detail" was set to "Name and Type" in Class Diagram Properties (under: Features)

Is this display property configurable on some other places, other than in Design -> Diagram -> Manage -> Properties (Features)?

Thanks!

Mario.
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: Geert Bellekens on September 27, 2022, 07:59:50 pm
Can you post an image?

Geert
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: mariop on September 27, 2022, 08:17:17 pm
I would, if I could.
Can't attach image in this forum.
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: Geert Bellekens on September 27, 2022, 09:01:40 pm
post an image on a public image site (such as imgur.com) and then post the link here.

Geert
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: mariop on September 27, 2022, 10:17:19 pm
OK, here is what is configured for that particular class diagram:
(https://i.imgur.com/UVPc8TF.png)

And here is result for one class in this example:
(https://i.imgur.com/3NddXa6.png)

In version 14 I see also data types for each attribute in diagram.
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: KP on September 29, 2022, 08:04:40 am
I am doing some comparison between models in current EA version (14) and migrated ones to new v16 and found class diagram which displays no attribute types in diagram, although "Show Attribute Detail" was set to "Name and Type" in Class Diagram Properties (under: Features)

What does 'migrated' mean in this quote? Did you open the whole model in EA16 or just export part of the model? And if the latter, is it possible that the attribute types are elements that didn't get exported?
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: mariop on September 29, 2022, 04:26:08 pm
Well, that is a very good point. I checked and, indeed, those types are missing, actually.

Even worse, I checked at the source - they are pointing to nonexistent objects. Well, this solves the mistery and gives us some work to do too. :)

Thanks for the tip!

Best regards,

Mario.
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: Geert Bellekens on September 29, 2022, 04:38:24 pm
There are actually two fields that contain the attribute type.

- t_attribute.Type: contains the name of the type
- t_attribute.Classifier: contains the object ID of the datatype element.

I'm guessing that in a previous version, when the datatype element is deleted, type name simply remains, even if there is no longer a reference to an element.
Probably in v16 this behavior has changed so it either clears the Type field, or simply doesn't show the type name in the diagram.

Geert
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: mariop on September 30, 2022, 09:54:09 pm
Hi,

Almost certainly was.

Or... What happens if defined attribute type object is moved to another package within EA? How will EA handle links to it? Will it be able to link to it, or will it point to non-existing object?

Because, that might also happen at source system at some point.

Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: Geert Bellekens on September 30, 2022, 10:30:08 pm
You can move them around all you want, the references will stay.
This can only happen if the datatypes have been deleted.

Geert
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: mariop on October 04, 2022, 07:23:09 pm
I thought as much.

There is, however, another possibility: someone who created that diagram could actually just write attribute type in the box. That way attribute type is sort of defined, but can't be refefrenced to certain object.

I found plenty of those while cleaning repository.

The same goes for custom stereotypes: I ended up with 2 custom stereotypes for classes visible, but actually not present in UML Types -> Stereotypes.
Once I defined them again in v16 and set custom color codes, all diagrams were shown with those custom codes (as it should be in the first place).

I find EA being too loose when it comes to definition and referencing of objects. It is very easy to come up with something which only looks ok, but is actually not well defined.
Title: Re: Attribute details not visible in class diagram (EA v16)
Post by: Geert Bellekens on October 05, 2022, 12:22:29 am
That's different. In that case the type field is filled, but the classifier field is empty (or 0)

Stereotypes is yet another thing. For anything serious you should not be using the UML Types -> Stereotypes at all, but define stereotypes in UML profiles instead.

Geert