Book a Demo

Author Topic: When is a stereotype not a stereotype?  (Read 4439 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
When is a stereotype not a stereotype?
« 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
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: When is a stereotype not a stereotype?
« Reply #1 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.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: When is a stereotype not a stereotype?
« Reply #2 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
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: When is a stereotype not a stereotype?
« Reply #3 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.