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

Bug 324561

Summary: [Model Browser] drag & drop
Product: [Modeling] MoDisco Reporter: Nicolas Bros <nicolas.bros>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: fabien.giquel, gdupe, hugo.bruneliere, modisco.web-inbox
Version: 0.9.0Flags: nicolas.bros: indigo+
Target Milestone: 0.9.0 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Nicolas Bros CLA 2010-09-06 06:42:30 EDT
Implement drag&drop in the model browser.
We should be able to drag & drop elements within one editor, or between 2 different editors. In this case, since the 2 editors have different ResourceSets and different EObject instances, the elements are passed by URI.
If the dragged EObject is already in a Resource loaded in the target editor, then it is used. Otherwise, the referenced Resource is loaded and added to the editor's ResourceSet.
Comment 1 Nicolas Bros CLA 2010-09-07 05:38:22 EDT
Done in revision 2998.

Drag&drop works inside one editor or between 2 editors.

Drag&drop an element onto another element to add it to a containment feature of the target element.
Drag&drop onto a link to add the element to the reference. If the reference is multivalued, the element is added. Otherwise, it replaces the previous value.
If the reference is a containment reference, then the element is moved by default, or copied if holding Ctrl.
If the reference is a non-containment reference, then the element is set by default, and cannot be copied (EMF mandates a containment tree).

Elements can also be re-ordered by drag&drop, by moving an element between 2 other elements under the same reference. Make sure "sort instances" is disabled if you want to see the result.
Comment 2 Hugo Bruneliere CLA 2010-10-05 04:56:04 EDT
Bug fixed.