Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328556

Summary: Enhance Instance Diagram 'Add Related Artifact'
Product: [Technology] Tigerstripe Reporter: Chris Hartley <chrhartl>
Component: DiagramsAssignee: Project Inbox <tigerstripe.diagram-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: nmehrega, valentin, yuri
Version: 0.5M1   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
enh
none
Patch_1
none
Class Diagram
none
Instance diagram
none
Patch_2 none

Description Chris Hartley CLA 2010-10-24 18:57:31 EDT
Two suggested improvements
(1) when adding a related instance, an association instance should be programmatically added between the new instance and the one that the action was started from.

(2) the action needs to take into account inheritance - I'll add an attachment on this
Comment 1 Chris Hartley CLA 2010-10-24 19:13:00 EDT
(3) This action should not include extends (or implements) relationships, which don't make any sense for instances - these need to be removed from the "Add Related Instances' - 'Select Related Artifact' dialog box
Comment 2 Chris Hartley CLA 2010-10-24 19:35:00 EDT
Created attachment 181604 [details]
enh

Feature should operate as per attachment.
Comment 3 Chris Hartley CLA 2010-10-24 19:36:27 EDT
This issue is a mixture of bugs and enhancement - feel free to re-classify if you wish
Comment 4 Valentin Yerastov CLA 2010-11-22 11:44:50 EST
Created attachment 183577 [details]
Patch_1
Comment 5 Valentin Yerastov CLA 2010-11-22 11:46:07 EST
Hi Chris,

I fixed what you requested for. Please, check whether all right.
Comment 6 Chris Hartley CLA 2010-11-22 15:41:30 EST
I only use the production profile.
If you believe you have completed it, then apply the patch and I'll check it out after the next release (or Navid can check it for you)
Comment 7 Navid Mehregani CLA 2010-11-22 16:20:57 EST
Yes, I'll verify the patch (Chris can only check out the changes at the end of an iteration).
Comment 8 Yuri Strot CLA 2010-11-23 01:08:50 EST
I applied patch from Valentin.
Comment 9 Navid Mehregani CLA 2010-11-26 11:53:39 EST
Please see attachment for the scenario that's failing.
Comment 10 Navid Mehregani CLA 2010-11-26 11:55:50 EST
Created attachment 183939 [details]
Class Diagram

Consider the attached class diagram.  Three entities A, B, C with associations to one another.

When A is dragged on an instance diagram and 'Add related artifacts' are added, it correctly identifies B and C.  However when they're both selected and inserted, it seems to insert two instances of B with incorrect associations.
Comment 11 Navid Mehregani CLA 2010-11-26 11:58:15 EST
Created attachment 183940 [details]
Instance diagram

See result of instance diagram when an instance of A is added and user selects 'add related instances'.

Two instances of B are added and the associations are incorrect.
Comment 12 Valentin Yerastov CLA 2010-11-28 07:53:02 EST
Created attachment 183995 [details]
Patch_2
Comment 13 Valentin Yerastov CLA 2010-11-28 07:58:46 EST
Hi Navid,

I have fixed your issue. It was all a consequence of this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=328853
Comment 14 Yuri Strot CLA 2010-11-29 06:34:56 EST
This patch already applied.
Comment 15 Navid Mehregani CLA 2010-11-29 10:35:30 EST
Thanks Valentin! Fix has been verified.