Book a Demo

Author Topic: Size of sterotyped Port  (Read 3526 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Size of sterotyped Port
« on: April 24, 2012, 08:53:21 pm »
Hi all,


Let's say I create a profile with a stereotype <<Blarg>> which applies to Components.
Let's then say I create a non-stereotyped Component "System" and one <<Blarg>> Component "SomeComp".

If I now drop SomeComp onto System and select to create a Port, the Port gets given the <<Blarg>> stereotype. All good -- except the Port is absolutely huge.

Why is this?

I've tried creating a <<blarg>> Port stereotype, with a shape script which only draws a small box. The small box gets drawn, but the bounding box for my Port is still ginormous.

If I don't have the Component stereotype in a profile but simply punch in a string using the keyboard, the Port gets the same non-profile stereotype, and is the right size.

Anyone recognize this?
Any way to work around it?
I'm on 9.2.921.


Cheers,


/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: Size of sterotyped Port
« Reply #1 on: April 24, 2012, 09:09:36 pm »
Sounds you are in a dark wood with mean animals around. I'm in another part of that wood. Maybe it helps if I start crying to expel the beasts?

(Sorry for my sarcasm)

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Size of sterotyped Port
« Reply #2 on: April 26, 2012, 08:17:38 am »
Sounds like your profile is being exported with sizes. Your port stereotype exists on the diagram without explicit size attributes so it exports with the size that it appears on the diagram.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Size of sterotyped Port
« Reply #3 on: April 26, 2012, 08:51:13 am »
... and the explicit size attributes that Simon mentions are called _sizeX and _sizeY. For a port, they should both have their initial value set to 16.
The Sparx Team
[email protected]

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Size of sterotyped Port
« Reply #4 on: April 26, 2012, 04:54:09 pm »
Thanks guys! Like a charm.  :)

For future reference, if you create a Component stereotype and a Port stereotype whose names differ only in the casing (eg «HTTP» for Components and «http» for Ports), EA gets it right.

Dropping an «HTTP» Component onto some other Component and selecting to create a Port will result in an «http» Port. Which, provided you've set the _sizeX and _sizeY attributes in the http stereotype, will be given the right size.

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.