Book a Demo

Author Topic: Pitfall hint on element size in component profiles  (Read 4879 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Pitfall hint on element size in component profiles
« on: August 27, 2008, 01:54:31 am »
Hi all.

Just to let you know and before people fall into the same pit...

When creating UML profile one is able to "override" the ExposedInterface and Port elements by creating the corresponding metaclasses and  extended stereotypes.

If you do this and export the profile make sure not to check the "Element size" option to include the element sizes in the profile.
If you do this EA will get confused about the display and dragging size because it does not expect size information for non-resizable elements like ports and ExposedInterfaces.
It will lead to very strange effects in the diagrams.

Just to let you know, I have not decided yet whether it should be considered to be a bug or not.

Oliver

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Pitfall hint on element size in component prof
« Reply #1 on: August 27, 2008, 04:16:36 am »
Regardless of whether it is a bug, the documentation needs to say something about this.

I suggest you send in a report regardless. Perhaps Sparx can shed some light on whether this is a bug or an unintended side effect.
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Pitfall hint on element size in component prof
« Reply #2 on: August 27, 2008, 09:31:19 am »
You can set the size of stereotyped ports to something other than the 16x16 default, and you need to be aware of that if you are checking the "Element Size" option on the Save as UML Profile dialog. In that case, give the stereotype element the attributes: _sizeX=16 and _sizeY=16.
The Sparx Team
[email protected]

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Pitfall hint on element size in component prof
« Reply #3 on: August 27, 2008, 09:43:35 am »
Quite right Neil.

I should have remembered this. It is under the Supported Attributes section. The documentation of this whole area is a bit sketchy, but what's there is correct and seems to be enough.

We stand corrected.

David

PS: Of course, that whole section could use some fleshing out, but really needs some meaningful (i.e. complete, relevant, and accessible) examples. There should also be some 'worked' sample profile files for people to use as a bootstrap.

But I've made those points before, under separate cover...
No, you can't have it!

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Pitfall hint on element size in component prof
« Reply #4 on: August 27, 2008, 05:19:23 pm »
Quote
You can set the size of stereotyped ports to something other than the 16x16 default, and you need to be aware of that if you are checking the "Element Size" option on the Save as UML Profile dialog. In that case, give the stereotype element the attributes: _sizeX=16 and _sizeY=16.

OK, thanks for pointing this out.

However if I set something different for eg. an ExposedInterface than the standard values the EA layout engine gets highly confused by making the element jump around rather unmotivated in the diagram instead of smothly move along the edges.

Oliver

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Pitfall hint on element size in component prof
« Reply #5 on: August 28, 2008, 09:11:53 am »
Exposed interfaces are difficult because they have different dimensions depending on which edge of their parent they are attached to (either 35x16 or 16x35). I have tried creating a shape script for one using the (new for build 832) defsize() command after checking the parentedge property, and it just gets horribly confused (as did I). I'll raise the bug report...
The Sparx Team
[email protected]