Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324561 - [Model Browser] drag & drop
Summary: [Model Browser] drag & drop
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 0.9.0 M2   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 06:42 EDT by Nicolas Bros CLA
Modified: 2013-04-29 07:55 EDT (History)
4 users (show)

See Also:
nicolas.bros: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.