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

Bug 437370

Summary: Unable to drag and drop an element from a list container to a freeform container
Product: [Modeling] Sirius Reporter: Stéphane Thibaudeau <stephane.thibaudeau>
Component: DiagramAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: alex.lagarde, belqassim.djafer, florian.barbin, laurent.redor, pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 3.0.0M5   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=428079
Whiteboard:
Bug Depends on: 447727    
Bug Blocks:    
Attachments:
Description Flags
Sample odesign
none
Sample project none

Description Stéphane Thibaudeau CLA 2014-06-13 09:02:29 EDT
Created attachment 244230 [details]
Sample odesign

NB : I'm using 1.0.0RC3 but it does not appear in the "version" list.

I have 2 container mappings : a list container (LC) and a freeform one (FC).
I'd like to define a drag and drop tool to allow one to drag an element from the list container and drop it onto the freeform container.

To do this I have specified my drop tool like this :
- drag source : diagram
- containers : FC (the drop target)
- mappings : the node mapping I want to drag

When I do this the D&D is not possible (no visual feedback neither).

I tried to add the dragged mapping as a reused node mapping in my freeform container (only as a test), the D&D is now possible but when it gets executed a ClassCastException occurs as described in ticket : https://bugs.eclipse.org/bugs/show_bug.cgi?id=428079


I provide an example odesign and an example project.
Steps to reproduce :
- import both projects
- open "test2" modeling project
- in My.ecore, open the diagram defined on the EPackage instance
- try to drag "a1" and drop it onto "pkg (mapping1)" => it is not possible
- try to drag "a1" and drop it onto "pkg (mapping2)" => the visual feedback is displayed but a ClassCastException occurs when executing the tool.
Comment 1 Stéphane Thibaudeau CLA 2014-06-13 09:02:49 EDT
Created attachment 244231 [details]
Sample project
Comment 2 Alex Lagarde CLA 2014-06-19 08:49:19 EDT
Issue reproduced with steps indicated by Stephane.
Comment 3 Stéphane Thibaudeau CLA 2014-06-19 08:55:46 EDT
More information on this one.

I have the same problem from a list container mapping to another list container mapping. The Drag&Drop was disabled. To enable it, in the target list container mapping I had to reuse the node mapping I wanted to drag.
Comment 4 Florian Barbin CLA 2014-12-04 09:53:22 EST
Actually the Container Drop Tool has to reference the target mapping within its "Mappings" list.
Comment 6 Belqassim Djafer CLA 2015-04-09 09:27:43 EDT
Verified on Sirius 3.0.0M6
Comment 7 Pierre-Charles David CLA 2015-06-24 11:13:07 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.