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

Bug 472885

Summary: [tooling] Papyrus-RT shall support CapsulePart creation using drag n drop from model explorer
Product: [Modeling] Papyrus-rt Reporter: Remi Schnekenburger <rschnekenburger>
Component: toolAssignee: Remi Schnekenburger <rschnekenburger>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: give.a.damus, papyrus-bugs, peter.cigehn
Version: 0.8.0   
Target Milestone: 0.8.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/72512
https://git.eclipse.org/c/papyrus-rt/org.eclipse.papyrus-rt.git/commit/?id=9c823e68677588fa4caa2bf58654d0db605ac402
https://git.eclipse.org/r/72915
https://git.eclipse.org/c/papyrus-rt/org.eclipse.papyrus-rt.git/commit/?id=afa5c9951797bb664c5e35da9a0c38dd4a02851e
Whiteboard:
Bug Depends on:    
Bug Blocks: 472883    

Description Remi Schnekenburger CLA 2015-07-16 19:41:38 EDT
One of the easiest way to create a new capsule part is by drag-an-drop of a Capsule from the model explorer onto the composite structure diagram of another capsule.
The drop target is always inside the contour of the other capsule.
Initially it is enough if a default of always creating an fixed capsule part (multiplicity [1..1], aggregation = composite), Changing to another type of capsule part is later made as a second step by directly changing the capsule part properties.
Comment 1 Remi Schnekenburger CLA 2015-08-04 09:12:26 EDT
fixed with commit a3613e7e327e8807d9c92724a03211284bb8b8e6
Comment 2 Peter Cigehn CLA 2015-08-21 04:30:08 EDT
I've tested this in the latest Papyrus-RT build. When you drop the capsule onto the composite structure diagram you get up a dialog asking if you want to create a capsule part or drop a type to create typed property. 

Since it really does not make sense to create an ordinary property typed by another capsule onto a capsule, the default of creating a capsule part should already have been pre-selected. 

I would expect that the only thing that can happen when dropping a capsule onto another capsules composite structure diagram is to create a capsule part typed by that capsule.

To simplify for the user, there should not be any choice at all when dropping.
Comment 3 Remi Schnekenburger CLA 2015-08-21 04:58:10 EDT
This second popup comes from the default UML configuration of the composite diagram, and for historical reason is not handled by the drag and drop strategy mechanism.

There are known workarounds for this, but the good way to fix it would be to handle the default drag and drop by the dnd strategy mechanism. 

I have created the bug 475569: [Composite Diagram] DnD strategy mechanism should be used to create PropertyPart
https://bugs.eclipse.org/bugs/show_bug.cgi?id=475569

In the mean time, I will use a workaround to remove the default strategy.
Comment 4 Remi Schnekenburger CLA 2016-02-26 08:43:55 EST
Still valid for 1.0.0
Comment 5 Peter Cigehn CLA 2016-05-11 03:41:36 EDT
Could Christian take a look at this one? Since Christian fixed the drag-and-drop case onto the border of a capsule part (without the additional popup appearing) in Bug 486444, maybe something similar could be made here?
Comment 6 Eclipse Genie CLA 2016-05-11 09:59:06 EDT
New Gerrit change created: https://git.eclipse.org/r/72512
Comment 8 Eclipse Genie CLA 2016-05-17 08:52:55 EDT
New Gerrit change created: https://git.eclipse.org/r/72915
Comment 10 Peter Cigehn CLA 2016-05-17 10:33:45 EDT
I have tested this in the latest Papyrus-RT build. The additional popup do not occur any longer, and the drag-and-drop operation is now fast and smooth as it should be, comparable to the legacy tooling.

I suggest that we put this one into resolved/verified fixed. I do not have the access right to do so.
Comment 11 Remi Schnekenburger CLA 2016-10-20 05:21:24 EDT
Closing bug for 0.8.0 version.