Author Topic: MDGs not listed  (Read 2965 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
MDGs not listed
« on: June 10, 2020, 12:13:41 am »
I had to step into the V13.5+ world recently and am faced with (as expected) an issue. Here's what I did:

- create a class containing a stereotyped part (from my MDG)
- instatiate the class and show the part
- add another stereotyped part to the class
- make the instance show the new part
-> first bug here: the newly shown part in the instance does not have a stereotype
-> 2nd bug: the part does not offer any of my MDGs so I can't apply the stereotype manually.

While the first bug is the same as in V13.5 the 2nd bug is new to V14 (and V15.1). So unlike in V13.5 I can not fix the first bug manually in V14 and V15?

Note: the issue only appears for parts (and IIRC ports) and not for other instances.

Futile questions: Known bug? Work around for V14+? (I can probably script-fix it but the users won't be happy)

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: MDGs not listed
« Reply #1 on: June 10, 2020, 08:46:21 am »
-> first bug here: the newly shown part in the instance does not have a stereotype
-> 2nd bug: the part does not offer any of my MDGs so I can't apply the stereotype manually.
The second part is a UML slot.

If your source stereotype also applied to Slot then it would have copied the stereotype. If it had copied the stereotype  anyway it would have required creating a new model stereotype in the background.

If you have any stereotypes extending Slot they should be offered in the dialog.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MDGs not listed
« Reply #2 on: June 10, 2020, 05:22:52 pm »
Well, adding a Slot made the drop down appear.

Code: [Select]
<AppliesTo>
<Apply type="Part">
<Property name="isReference" value="false"/>
</Apply>
<Apply type="Slot"/>
</AppliesTo>


But it disables the Part in the toolbox. I needed to add (UML::Part) to distinguish it:

Code: [Select]
<Tag name="XX Logical 3::part(UML::Part)" default="Logical part"/>
I now just see the <<>> icon where formerly the part rectangle was shown.

BTW: The lost stereotype is not as you got it. When you already have an instance and add a new part to the class the slot does not get the stereotype. Only when you create an instance of a class that already has a part it will copy the stereotype. That's wrong ever since.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MDGs not listed
« Reply #3 on: June 12, 2020, 06:33:14 pm »
I guess my assumption was right. For now I can replace one bug with another one that's worse.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: MDGs not listed
« Reply #4 on: June 15, 2020, 09:50:48 am »
But it disables the Part in the toolbox. I needed to add (UML::Part) to distinguish it:

Code: [Select]
<Tag name="XX Logical 3::part(UML::Part)" default="Logical part"/>
I now just see the <<>> icon where formerly the part rectangle was shown.
That's expected. If you don't specify the metaclass in the toolbox and your stereotype extends multiple EA can't guess which metaclass you want. It shows that icon and offers you the choice when you place one.

BTW: The lost stereotype is not as you got it. When you already have an instance and add a new part to the class the slot does not get the stereotype. Only when you create an instance of a class that already has a part it will copy the stereotype. That's wrong ever since.
Not sure. My opinion is that requirement was always a weird one, and that what people probably actually wanted was to display the property's stereotype rather than actually explicitly copy it. You get more control over the stereotype by using two stereotypes with «metacontraint» { umlRole=slot } between them.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MDGs not listed
« Reply #5 on: June 15, 2020, 06:41:51 pm »
But it disables the Part in the toolbox. I needed to add (UML::Part) to distinguish it:

Code: [Select]
<Tag name="XX Logical 3::part(UML::Part)" default="Logical part"/>
I now just see the <<>> icon where formerly the part rectangle was shown.
That's expected. If you don't specify the metaclass in the toolbox and your stereotype extends multiple EA can't guess which metaclass you want. It shows that icon and offers you the choice when you place one.

You still don't get my point. I added (UML::Part) to distinuish it. But still I see <<>>. It does not work in any way. Catch 22.

q.