Book a Demo

Author Topic: Insert Related Elements  (Read 5386 times)

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Insert Related Elements
« on: October 28, 2013, 08:04:00 am »
Back a version or two ago, a contractor on a project I was working on wrote a Diagram builder tool add-in.  This was a neat tool because we were working with a tool which built a model with appropriate stereotypes for everything and this tool would let one follow any particular stereotype link to any desired depth or not follow as desired.  In particular, this was useful for creating summary versus detail diagrams depending on the type of stereotypes selected.  I am having trouble getting this to show up in EA10.  

While pursuing that, I discovered Insert Related Elements which clearly has a similar purpose.  The big downside is that it doesn't allow selecting by stereotype and so, for example, both detail and summary control flow links will be followed when one only wants one or the other in each instance.

Any clever ideas how to work with this (other than getting the old tool working)?

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Insert Related Elements
« Reply #1 on: October 30, 2013, 11:50:41 pm »
Hello,

if there is no EA feature you can write an Addin which adds the related elements according to your rules to the diagram.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Insert Related Elements
« Reply #2 on: October 31, 2013, 01:03:04 am »
That was the sort of add-in I referred to the contractor having written ... I just don't have it working yet in my current EA so I was looking for alternatives.   Seems like selection by stereotype would be a powerful feature.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Insert Related Elements
« Reply #3 on: October 31, 2013, 09:09:13 am »
You can select by stereotype, but only stereotypes that have a metatype defined. For example, BPMN sequence flow connectors, which are stereotyped control flows, show up as 'SequenceFlow' not 'ControlFlow'.

Search the help for "_metatype" for full details, but in short you need to define the stereotype in a profile and give it an attribute named "_metatype" with a non-blank initial value.
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Insert Related Elements
« Reply #4 on: October 31, 2013, 09:50:14 am »
Neil,
can you explain in short why EA favors _metatype stereotypes over those with none? It obviously has impact on other EA functionality as well.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Insert Related Elements
« Reply #5 on: October 31, 2013, 10:25:28 am »
There is a SysML stereotype «continuous» which can be applied to control flows. If you point to a «continuous» control flow and ask a SysML modeller what it is, they will say it's a control flow. When they search their model looking for control flows, they will expect the continuous ones to show up.

Ask a BPMN modeller about sequence flows, and they probably won't have even heard of UML control flows, let alone know that their sequence flows are stereotyped control flows. They aren't going to search their model for control flows; they are only interested in sequence flows.

That's why the BPMN sequence flow stereotype was defined as a metatype and the SysML continuous stereotype wasn't, and why EA treats them differently in a number of places. It's all about the names we call things by.

I hope that makes sense.
« Last Edit: October 31, 2013, 10:26:19 am by KP »
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Insert Related Elements
« Reply #6 on: October 31, 2013, 04:02:40 pm »
Yes, it does. Thank you :)

q.