Author Topic: Shape script - sequence diagram - namespace issue  (Read 3941 times)

Jerry Gray

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Shape script - sequence diagram - namespace issue
« on: April 11, 2012, 12:56:57 am »
Hi folks, I modified the actor stereotype because we wanted to use a rectangular shape instead of the stick figure.

The challenge is that in my sequence diagrams my "stick figure" stereotypes have the namespace, e.g. "from Approved Actors" (this is the name of the package the actor is kept in), at the bottom of the lifeline, (as it should be).  However, the stereotype that I have modified to, has the namespace at the top of the lifeline, which is annoying.  :(

The question is, how do I get the namespace to be back at the bottom of the lifeline?

shape code below.

shape main
{
      noshadow = "true";
      h_align = "center";
      
      editableField = "name";
      
      setfillcolor(255, 255, 255); // (R, G, B)
      rectangle(0,0,100,100);
      //uses the name set by the user when creating
      //the instance
      println("#name#");
      
}

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Shape script - sequence diagram - namespace is
« Reply #1 on: April 11, 2012, 05:52:38 pm »
Hi,

You don't even need to provide your own shape script to achieve this. Right click on the actor, choose Advanced->Use Rectangular Notation.

HTH,
Günther

Jerry Gray

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Shape script - sequence diagram - namespace is
« Reply #2 on: April 12, 2012, 04:02:47 am »
Wow.  That was way too easy.

Thanks.

Jerry Gray

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Shape script - sequence diagram - namespace is
« Reply #3 on: April 12, 2012, 04:16:39 am »
Ah, now back to the original problem, when the actor is switched to rectangular notation the namespace moves to the top of the lifeline instead of staying at the bottom.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Shape script - sequence diagram - namespace is
« Reply #4 on: April 12, 2012, 07:32:57 pm »
That's the way EA is doing it. You would need to submit a feature request.

q.

Jerry Gray

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Shape script - sequence diagram - namespace is
« Reply #5 on: April 12, 2012, 11:54:05 pm »
Dear feature request, please be consistent in namespace placing.   ::)

I have found a benefit of using the shape script over right-clicking on a actor and selecting rectangular notation:  

Changing to rectangular notation can apparently only be done after the actor is placed in a sequence diagram, while using the shapescript can apply a stereotype to a set of actors in a package, saving the user from having to make the change in the diagram.