Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Uffe on March 05, 2020, 02:43:12 am

Title: When is a stereotype not a stereotype?
Post by: Uffe on March 05, 2020, 02:43:12 am
Hi everybody,


I've stereotyped me an Artifact. Yay!

But I'd quite like to override the upper-right Artifact icon. This isn't easy, and it's not vitally important, but my quest has led me to make the following observation:

EA can't keep the concept of a stereotype straight in its head.

If I create one of my stereotyped Artifacts, by default it is presented with the standard Artifact icon in the upper right, and my stereotype above the name. As expected.
If I then go into the diagram properties and switch off Use Stereotype Icons, the icon vanishes. But the stereotype above the name is now padded with «artifact».
I then switch off Show Element Stereotypes. My stereotype vanishes, «artifact» remains.
If I switch Use Stereotype Icons back on, «artifact» is removed and the icon is once again shown.

So according to the diagram properties dialog, the «artifact» string is a stereotype, because it is shown in place of a stereotype icon. Stereotype icon, mark. It is also not a stereotype, because it is shown when stereotypes are switched off.

Which is it?


/Uffe
Title: Re: When is a stereotype not a stereotype?
Post by: qwerty on March 05, 2020, 06:43:04 am
P. 655 of UML 2.5
Quote
An Artifact is presented using an ordinary Class rectangle with the keyword «artifact».

Blame OMG for not making keywords and stereotypes distinct.

q.
Title: Re: When is a stereotype not a stereotype?
Post by: Paolo F Cantoni on March 05, 2020, 09:01:42 am
P. 655 of UML 2.5
Quote
An Artifact is presented using an ordinary Class rectangle with the keyword «artifact».

Blame OMG for not making keywords and stereotypes distinct.

q.
Hi Uffe,

qwerty is correct. Does your stereotype use a shapescript?  If so, then the usual solution is to mask the Sparx "icon" (is it an icon or a decoration) with a blank rectangle and then put your own decoration over the top.  We do it all the time.

HTH,
Paolo
Title: Re: When is a stereotype not a stereotype?
Post by: Eve on March 05, 2020, 01:55:48 pm
The problem is that 'Use Stereotype Icons' does more than it says. The same option is used for optional icon notations for core UML types that would otherwise be displayed with a keyword.

EA does not provide an option for hiding keywords. (Except the keywords on connectors can usually be hidden by hiding the appropriate label)

Blame OMG for not making keywords and stereotypes distinct.
Or come to a convoluted explanation that everything inside «» is a keyword, where the default keyword for a stereotype is its name.