Author Topic: Access association class connector properties from shape script  (Read 7559 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Hi Gurus!


I've stereotyped an association class, and I would like to be able to show which elements it connects in the shape script for the class. That way I can drop the association class in a diagram on its own and see its source and target.

The information is available in a connector shape script, but of course I'm in an element context.
So is there a way to do this without resorting to an Add-In call?

Cheers,


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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Access association class connector properties from shape script
« Reply #1 on: April 19, 2016, 11:55:01 pm »
I guess not. But you already named the fallback.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Access association class connector properties from shape script
« Reply #2 on: April 20, 2016, 12:00:11 am »
Yeah... I want to avoid that if at all possible since it doesn't scale very well performance-wise.
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Access association class connector properties from shape script
« Reply #3 on: April 20, 2016, 12:46:00 am »
I know. We will for sure not see any unified approach for all those scripting cripples Sparx has bred in the past :P

q.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Access association class connector properties from shape script
« Reply #4 on: April 20, 2016, 06:49:18 am »
Hi Uffe, you'll also find that the document generation can not determine either end of the association, and you can't select the link between the associated class and the association to straighten it.  I have a couple of feature requests logged to fix this.  I suggest you get a feature request logged for your problem.  To me as this is core UML it should be high on the priority list rather than all the new fancy doodads.

When I first discovered association classes I couldn't imagine what I could use them for but it turns out they tidy up the visual modelling of pretty much every relationship and allow you to create much neater diagrams that work well with the business. 

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Access association class connector properties from shape script
« Reply #5 on: April 20, 2016, 07:50:51 am »
Well, an association class is not an association. It's a homunculus which is both, class and association. It has its good use, but it's not good for putting association notes inside.

q.

Sorry, mixed up things. Though the above is not wrong, it has nothing to to with this thread.
« Last Edit: April 20, 2016, 04:38:35 pm by qwerty »

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Access association class connector properties from shape script
« Reply #6 on: April 20, 2016, 08:20:01 am »
Well, an association class is not an association. It's a homunculus which is both, class and association. It has its good use, but it's not good for putting association notes inside.

What do you mean by "association notes"?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Access association class connector properties from shape script
« Reply #7 on: April 20, 2016, 04:33:54 pm »
Oops, sorry. Please forget my last post. I had been mixed up with two different things and produced simply nonsense.

q.