Author Topic: Attach Shapescripts to Tagged Value Types  (Read 9305 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Attach Shapescripts to Tagged Value Types
« on: February 15, 2012, 01:40:53 pm »
Shape scripts have a number of issues but are still very useful.

We have started to used shapescripts to adorn vertices and arcs that have specific "properties" (expressed as Tagged Values).  The shape scripts create little adornment glyphs that enable the user to see the property (and value) rendered on the shape.  This has proved EXTREMELY USEFUL.

However, the downside is that EVERY stereotype that the property might appear in has to have the shape script "aspect" (HasTag() etc...) added to it and maintained.  This, naturally creates a combinatorial explosion and maintenance nightmare!

If, however, shape scripts could be added to Tagged Values types, then you could define the "widget" once and EA could check the list of tagged values associated with the object and run the relevant shape scripts.

If you think the idea has merit, please give it your support.

In addition, we might discuss any implementation issue that might arise - for example, should it be unconditionally universal?  That is, if I define a shapescript for a tagged value type, should it apply to any object that has the tagged value specified, or should there be some constraining mechanism?

Reported,
Paolo
[size=0]©2012 Paolo Cantoni, Semantica[/size]
« Last Edit: February 15, 2012, 01:45:50 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #1 on: February 15, 2012, 08:51:54 pm »
Hmm. How could you distinguish between tags for elements and vertices?

q.

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #2 on: February 15, 2012, 08:59:11 pm »
Without drilling into the detail, the overall approach makes sense to me.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #3 on: February 15, 2012, 11:25:24 pm »
Quote
Hmm. How could you distinguish between tags for elements and vertices?

q.
Did you mean vertices and arcs?  

If so, there are already shapescript constructs that allow you to tell if a shapescript is operating on a vertex or an arc.  I've done that a bit in the past with base class: <All>.  I can't remember the details but it can be done.

Paolo
« Last Edit: February 15, 2012, 11:26:00 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #4 on: February 16, 2012, 01:57:24 am »
There are different methods for drawing elements and connectors. There must be some mechanism to assign a tag for one of both. I guess a shape script designed for a connector would not work for an element.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #5 on: February 16, 2012, 10:17:22 am »
Sparx have replied that they have accepted the Feature Request, but (naturally) can't say when it will be implemented.

So...

If you want it, ask for it!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Michael Proske

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #6 on: March 07, 2012, 07:21:27 am »
Paolo can you post the shape script as an example
Regards Michael

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #7 on: March 07, 2012, 10:58:10 am »
Quote
Paolo can you post the shape script as an example
Regards Michael
Hi Michael,

I think this is one...  The trick is to test for a property that only shapes have:  diagram.name

Code: [Select]
shape main
{
  if (hasproperty("diagram.name"))
  {
    //Do Line stuff
  } else
  {
    //Do Shape stuff
  }
}

Don't forget to set the base class to: <all>.

HTH,
Paolo
« Last Edit: March 07, 2012, 11:00:40 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: TVT attached scripts extend MDGs
« Reply #8 on: March 07, 2012, 11:08:20 am »
While I'm here.  let me note that attaching shapescripts to tagged values is a REALLY neat way to easily extend MDGs created by others.

One of the REAL problems with EA is that the ONLY mechanism for engaging shape scripts is the stereotype (and that - if you've read my previous posts on the subject - is less than fully functional).  Consequently, everything needs to go through stereotypes - a conflation process.

Much of the time, all we want to do is to adorn existing renderings with additional "widgets" based on the presence/absence of additional properties - correctly stored as tagged values.

If tagged values could have shape scripts attached, then it would be easy and consistent to add properties to existing types and have them rendered on the diagram.  this would obviate the need to extend existing stereotypes to accomplish objectives that aren't directly related to the concept of stereotype.

Please show your support for this proposal.

Paolo
[size=0]©2012 Paolo Cantoni, Semantica[/size]
« Last Edit: March 08, 2012, 10:16:02 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #9 on: March 07, 2012, 09:16:01 pm »
Makes a lot of sense. Like a couple of other proposals I've seen here and we're still waiting to be implemented. Now floating windows is now one of them (I haven't downloaded yet but at least it's one off the list).

Maybe this request is one of the first things they tackle after they corrected my 50+ bug reports.

q.
« Last Edit: March 07, 2012, 09:17:51 pm by qwerty »

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #10 on: March 08, 2012, 10:40:38 am »
I can confirm 930 floats windows, allowing several diagram tabs for example to be dragged outside the main windows and viewed simultaneously
Orthogonality rules
Using EA16.1 (1627) on Windows 11 Enterprise/64 bit. Repositories in SQLServer2019 DB Schema 1558.
WebEA on Pro Cloud Server 4.2.64

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #11 on: March 13, 2012, 06:15:10 pm »
Bump!

Can folks, please register their support with Sparx for attaching shapescripts to Tagged Values types?

Daily, I'm finding new uses for such functionality.  It would REALLY help get consistency in rendering across large-scale enterprise repositories.

It shouldn't be too hard to implement - most of the functionality is already there...

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #12 on: June 12, 2012, 04:59:10 pm »
BUMP!

Please support this proposal.  Sparx have agreed (above) to accept the feature request, but one hopes that the more support it gains, the sooner it will be implemented.

Working in the enterprise space convinces me that "this is a winner".  Because of the various types of items one deals with, the ability to render consistent properties consistently is an important capability.

Indeed, at a client site, a competitive product in the Enterprise Architecture space (which was ultimately selected) demonstrated such a capability.  Obviously, that wasn't the deciding factor, but I know that that capability did impress.

It seems to me increasingly that case that we will need to adorn the basic shapes with such widgets to "expose" properties of the underlying objects.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #13 on: June 12, 2012, 11:47:41 pm »
Does the SD Times 100 award help to speed this up?

q.

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Attach Shapescripts to Tagged Value Types
« Reply #14 on: June 13, 2012, 12:04:20 am »
+1 from my side