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

Bug 290271

Summary: [All Diagrams] DND does not test the semantic model to allow / disable drop
Product: [Modeling] Papyrus Reporter: Yann Tanguy <yann.tanguy>
Component: CoreAssignee: Yann Tanguy <yann.tanguy>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Patrick.Tessier
Version: 0.7.0Keywords: plan
Target Milestone: M2   
Hardware: PC   
OS: Windows XP   
Whiteboard: UML 2.x Diagrams
Attachments:
Description Flags
mylyn/context/zip none

Description Yann Tanguy CLA 2009-09-23 10:10:38 EDT
With current implementation, it is possible to create specific behavior for drag and drop of element from the model explorer that one want to show in diagrams.
The issue here is that the default behavior tends to allow any drop, especially it does not take semantic containments into account.

For example, a Property created in a Class can be dragged from the explorer and dropped on another Class.
Comment 1 Yann Tanguy CLA 2009-09-23 10:16:42 EDT
The CommonDiagramDragDropEditPolicy not check if the Graphical parent for the drop has a containment relationship with the dropped element.
This constraint is not taken into account for Package, as they are associated to canvas of most diagram, the constraint may be too restrictive in such a case.

Also note that specific behavior is still possible with the same mechanism used for links in the Class Diagram.

Done in r507.
Comment 2 Yann Tanguy CLA 2009-09-23 10:16:45 EDT
Created attachment 147892 [details]
mylyn/context/zip
Comment 3 Yann Tanguy CLA 2009-09-23 10:17:54 EDT
Done in r523, not 507.