Book a Demo

Author Topic: Stereotyped UML:Port are oversized even with Default-Size  (Read 4847 times)

Shounbourgh

  • EA Novice
  • *
  • Posts: 18
  • Karma: +1/-0
    • View Profile
Stereotyped UML:Port are oversized even with Default-Size
« on: May 10, 2016, 05:25:04 pm »
Hi,

i am fairly new to EA and developing a MDG Technology in Enterprise Architect, containing a UML-Profile.

I added a Unit-Stereotype (extending UML:Component) and a Signal-Stereotype (extending UML:Port).

After I added a Signal to Unit, the Signal is docked/anchored to the Unit - like a Port to a Component but it is extremely over sized (sth like 200x150). If i add a Port to the Unit the port keep its default size of 16x16. I tried to set the default size of Signal (_sizeX, _sizeY) but it wasnt helping.

Anyone has an idea to fix that problem or is it a bug?

Kind regards, Erik



KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Stereotyped UML:Port are oversized even with Default-Size
« Reply #1 on: May 10, 2016, 05:37:11 pm »
Try switching off the Element Size option on the Save UML Profile dialog. If you don't want to do that (because some other stereotype in the profile needs to be set to a specific size) then, as you say, adding _sizeX and _sizeY attributes to the Signal stereotype class with Initial Value of "16" should fix it. If it doesn't, then I would need to see your profile diagram and profile XML file to figure out what is going wrong.
The Sparx Team
[email protected]

Shounbourgh

  • EA Novice
  • *
  • Posts: 18
  • Karma: +1/-0
    • View Profile
Re: Stereotyped UML:Port are oversized even with Default-Size
« Reply #2 on: May 10, 2016, 07:02:17 pm »
So i was able to reproduce both cases (and the same issue occurs with stereotypes of ProvidedInterface / RequiredInterface, so seemingly with anchored/docked elements)

1) When the "_metatype"-property of Signal (the Stereotype of Port) was set, the instance in the diagram was oversized after creation (and it keeps its size)
2) When the "_metatype"-property of Singal wasnt set, the instance in the diagram has the same (and expected) behaviour like Port.

I dont exactly know when its really necessary to have this property set, but i am planning to write scripts and maybe some Model Transformations.
Is the "_metatype"-property needed for these tasks? It seems it to be the "correct way" to have this property set. Otherwise i will leave it open for all stereotypes.