Book a Demo

Author Topic: Compartment Visibility for Stereotypes  (Read 8520 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Compartment Visibility for Stereotypes
« on: August 12, 2021, 03:50:08 am »
Hey all

For some reason when I create a Stereotype, the feature compartments don't show up.
So when I add an attribute to the Stereotype, it doesn't show up in the stereotype "box".

The attributes compartment DOES show up in a standard UML Class (after I have enabled Attribute Visibility for the Diagram) but the same cannot be said for the Stereotype.

I've got the _AttPkg, _AttrPri, _AttPub attributes all set to true (1) and so I cannot think of a reason why it doesn't work.

Any and all assistance is appreciated.

Cheers

Jays :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #1 on: August 12, 2021, 06:17:07 am »
Maybe you placed them in the stereo rather than in the metaclass?

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #2 on: August 12, 2021, 09:24:52 am »
You mean the _AttPkg etc?
If so, good suggestion but I added them using the profile helpers so they ended up in the right spot.

Cheers :-)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #3 on: August 12, 2021, 10:04:18 am »
You mean the _AttPkg etc?
If so, good suggestion but I added them using the profile helpers so they ended up in the right spot.

Cheers :-)
Sorry, Jays,

I'm with qwerty...  The documentation says they are "Metaclass element Attributes".  Is it conceivably possible that the Sparx coders have coded them incorrectly?  :o  Admittedly, they smell like stereotype attributes, but the documentation says otherwise.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #4 on: August 12, 2021, 04:16:38 pm »
So actually which metaclass do you extend? I might give it a try.

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #5 on: August 13, 2021, 03:43:29 pm »
Hey guys

I know, a bit driving me crazy.
I extended the Class metaclass just as a quick test.
The XML is below:

         <Stereotype name="New Class" notes="" cx="0" cy="0">
            <AppliesTo>
               <Apply type="Class">
                  <Property name="_AttInh" value="1"/>
                  <Property name="_AttPkg" value="1"/>
                  <Property name="_AttPri" value="1"/>
                  <Property name="_AttPro" value="1"/>
                  <Property name="_AttPub" value="1"/>
                  <Property name="_HideStype" value="Att1"/>
                  <Property name="_OpInh" value="1"/>
                  <Property name="isActive" value=""/>
               </Apply>
            </AppliesTo>
         </Stereotype>

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #6 on: August 13, 2021, 04:58:54 pm »
Hey guys

I know, a bit driving me crazy.
I extended the Class metaclass just as a quick test.
The XML is below:

         <Stereotype name="New Class" notes="" cx="0" cy="0">
            <AppliesTo>
               <Apply type="Class">
                  <Property name="_AttInh" value="1"/>
                  <Property name="_AttPkg" value="1"/>
                  <Property name="_AttPri" value="1"/>
                  <Property name="_AttPro" value="1"/>
                  <Property name="_AttPub" value="1"/>
                  <Property name="_HideStype" value="Att1"/>
                  <Property name="_OpInh" value="1"/>
                  <Property name="isActive" value=""/>
               </Apply>
            </AppliesTo>
         </Stereotype>
and.... ?

BTW: cx=0 & cy=0 look a bit odd...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #7 on: August 13, 2021, 05:05:56 pm »
Hey Paolo

cx &cy = 0 are the default sizes for Stereotypes IIRC.
Anywho, when you said "and?", what were you wanting to know?

Cheers :-)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #8 on: August 13, 2021, 07:45:22 pm »
Hey Paolo

cx &cy = 0 are the default sizes for Stereotypes IIRC.
Anywho, when you said "and?", what were you wanting to know?

Cheers :-)
Did it work, not work?  Anything change?
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #9 on: August 13, 2021, 08:28:15 pm »
Didn't work for me either. It's a bug. Or how the Sparxians call it: a feature :-/

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Compartment Visibility for Stereotypes
« Reply #10 on: August 13, 2021, 08:30:24 pm »
Said that and found it: remove the element from the diagram and drag it back. Now it DOES have the flag. Is it a fault? Is it a bug? No! It is a feature!

q.