Hi all,
I've got some issues with Composite elements and diagrams in EA. I would call this behaviour buggy, but I'd like to hear your thoughts.
My premise is that the Composite element/diagram relationship should be strictly one-to-one and that the diagram should always be contained in its parent element, but in certain circumstances EA violates both these principles.
Weirdness #1: EA allows you to move a Composite diagram out of its parent element.
When you do, the Composite relationship is retained, so that if you then double-click the element in a different diagram, you navigate to the composite diagram -- which is now located somewhere else.
Weirdness #2: multiple Composite elements can share the same diagram. Here's how:
1. Create an Activity diagram "Blarg". Put some simple stuff in it.
2. Create a second Activity diagram "Honk", preferably in a different package.
3. Into the "Honk" diagram, drag the "Blarg" diagram from the browser and select to create a Hyperlink.
4. EA creates a Composite Activity named "Blarg" whose composite diagram is the "Blarg" diagram.
5. Repeat 3 a few times. You now have several Composite Activities which share the same diagram (which is not actually contained in any of the Activities).
I would suggest the following behaviour instead.
#1: If you try to move a Composite diagram out of its parent element, EA either refuses while the element is marked as Composite (forcing you to un-Compositeify the element first), or automatically breaks the Composite relationship.
#2: In drop-diagram-on-diagram situations where EA would create a Composite element, extend the "Drop Diagram As" dialog to include both Hyperlink and Composite Element.
A Composite element should be created in the package where the dragged diagram ("Blarg" above) is located, not in the package where the dropped-onto ("Honk") diagram is located, and the diagram should be moved into the new element.
The Composite Element option should only be available if the diagram is not already a composite diagram.
Thoughts?
/Uffe