Book a Demo

Author Topic: IsConnector Query Method for Shapescripts  (Read 3217 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
IsConnector Query Method for Shapescripts
« on: April 21, 2010, 04:17:37 am »
With the increasing use of MDG Technologies, the UML requirement that a named stereotype can only be defined once for a particular Profile/Namespace really starts to impinge on the ability to correctly render the appropriate item on the diagram.

Since the only way to effect/affect the automatic rendering of an item on the diagram from the MDG Technology is to use shapescripts, the shapescript needs to be able to adapt to both a vertex and an arc, as required.

There is currently NO reliable, enduring, mechanism to determine if one is dealing with a vertex or an arc.  Previously, I "fudged" it using a property that was valid only for Elements.  But, Sparx then extended it to be available for Connectors also (You just can't win can you?  ;))

So it's a time to do it right and provide an IsConnector() query method (similar to the HasProperty and HasTag query methods) to specifically indicate whether the shapescript is currently operating on a vertex or arc.  This is particularly relevant for when the stereotype is assigned to an AssociationClass which has BOTH implementations!

Reported,
Thoughts?
Paolo
« Last Edit: April 21, 2010, 04:20:22 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!