Author Topic: Attaching diagrams to elements  (Read 14315 times)

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Attaching diagrams to elements
« Reply #15 on: September 01, 2007, 07:51:31 pm »
well..I guess we should also distinguish aggregation.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8605
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Attaching diagrams to elements
« Reply #16 on: September 01, 2007, 09:06:35 pm »
Quote
I should think the composite must also have ownership of its Meronyms.  Or, are you including aggregates in this discussion as well?
Yes, Jim...  I forgot...  Ownership, in this case being the ability to destroy...

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

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Attaching diagrams to elements
« Reply #17 on: September 02, 2007, 03:47:45 pm »
Quote
Ownership, in this case being the ability to destroy...

And perhaps exclusive access to the Meronyms. Only by me may you access my parts.

However, Eric Evans (of DDD fame) does allow multiple root aggregates. Is that a factor also?

My apologies if I'm muddying up the water here.

Verbal Use Cases aren't worth the paper they are written upon.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Attaching diagrams to elements
« Reply #18 on: September 04, 2007, 03:00:48 pm »
Quote
To the <context Menu>Advanced> sub menu:

1) If the element is structural, add the Composite Element menu item and the Show Composite Diagram Contents (which, by the way, should be disabled is the element isn't composite).  Actioning the first option, will create a Composite Structure Diagram below the element.  Actioning the second, displays the contents of that diagram.
2) In addition, add a new menu item Attach Diagram to Element.  If this is actioned, a tabbed dialog displays.  One tab shows a browser to allow the user to browse for an existing diagram, the other tab displays the new diagram dialog will be opened asking for the type of diagram to create.  If a new diagram is requested, it is added below the element, otherwise the browsed for diagram is attached.  As with the Composite element menu options, an additional Show Attached Diagram Contents item (again, disabled if there is no attached diagram) allows the display of the diagram.
NOTE: If Composite Element is true, then Attach Diagram to Element is disabled (and vice versa).  That is, you can only set one of the options if none are currently set.
3) If the element is non-structural, then only the Attach Diagram to Element functionality is available.  This also applies to instances of structural elements.


Paolo, I refactored your suggestion then refactored some more until I came up with a one-liner that is (IMO) a vast improvement:

All diagram objects should have "Add Diagram" and "Link to Diagram" commands on their context menu, making the "Composite Element" command redundant.

I think it maintains the spirit of your suggestion and addresses all the issues, so I have logged it as a feature request. It is not trivial to implement, so it will have to go through the approval process, of course.

I think the only issue not addressed is the fact that the "Show Composite Diagram Contents" command needs to be hidden when there's nothing to show. That's an easy fix.
The Sparx Team
[email protected]

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Attaching diagrams to elements
« Reply #19 on: September 05, 2007, 04:37:51 am »
Reflecting elsewhere  ;)
Quote
All diagram objects should have "Add Diagram" and "Link to Diagram" commands on their context menu, making the "Composite Element" command redundant.


All diagram objects clearly (and umbiguously ((?sp)) )includes the word [glb]edges[/glb]. ... ... ???

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Attaching diagrams to elements
« Reply #20 on: September 05, 2007, 07:28:53 am »
And also extends to declared operations within class elements??
Verbal Use Cases aren't worth the paper they are written upon.

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Attaching diagrams to elements
« Reply #21 on: September 05, 2007, 07:51:36 am »
What about elements actually being part of (destroyed with) the containing (composite) element?
Recursion definition:
If you don’t understand the definition read "Recursion definition".

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Attaching diagrams to elements
« Reply #22 on: September 05, 2007, 01:31:57 pm »
Quote
Reflecting elsewhere  ;)

All diagram objects clearly (and umbiguously ((?sp)) )includes the word [glb]edges[/glb]. ... ... ???

bruce

With EA the way it is, there's no way to add a child diagram to an element that doesn't appear in the Project Browser, so having an "Add Diagram" command for edges is impossible without a huge redesign. I can't think of any major obstacles to a "Link to Diagram" command for edges though (but where would you put the "0-0" link symbol?)

Quote
And also extends to declared operations within class elements??

Practical problem here is that, with the current schema, a diagram assumes its owner is in the t_object table which operations aren't - not insurmountable, just troublesome. I can't think of any major obstacles to a "Link to Diagram" command for operations.

Quote
What about elements actually being part of (destroyed with) the containing (composite) element?

My view is that is best handled by the user in the Project Browser and would add too much baggage to the suggested commands. If you want a composite or structured element (whatever your definition of those terms is), then the "Add Diagram" and "Link to Diagram" commands can help you create one but shouldn't actually define what one is (which is why the "Composite Element" command causes such confusion).
The Sparx Team
[email protected]