|
|
|
|
Re: Custom Drag Source for container drop tool [message #1747123 is a reply to message #1747070] |
Wed, 09 November 2016 17:47 |
Chris Mamorella Messages: 34 Registered: June 2013 |
Member |
|
|
EDIT: I was able to clone from the https:// site. Thank you for that.
Upon further investigation, the issue I'm having seems like it may not be related to the drag-and-drop part at all. The Sirius editor currently recognizes the object that I'm trying to drop in, and in fact updates the EMF semantic model after the drop. But something is immediately forcing the model change to be rolled back... which is why it looks like the drag-and-drop is not working.
It would be greatly appreciated if you can point me to the Capella Sirius design description so I can compare and see if there is something in the Container Drop description that will shed some light.
[Updated on: Wed, 09 November 2016 18:16] Report message to a moderator
|
|
|
|
Re: Custom Drag Source for container drop tool [message #1747222 is a reply to message #1747147] |
Thu, 10 November 2016 23:06 |
Chris Mamorella Messages: 34 Registered: June 2013 |
Member |
|
|
Laurent,
Thank you for your quick replies.
I tried integrating the CapellaCommonDragAdapterAssistant but #setDragData is never called. Looking at the transfer types declared, I'm not sure that class is extending anything. My view extends CommonNavigator, so DnD support should already exist for transfers within the same eclipse instance, right?
I am getting mixed signals on whether the Sirius editor can handle DnD from ONLY a model explorer-based view or if it can handle other EMF-based tree viewers. I was hoping that the Sirius editor would recognize any drag source that contained an EMF object as long as the Container Drop specified the "model" as the source. My Tree Viewer takes an EMF data structure as input and the nodes that I am dragging are the same EMF objects that are referenced in the diagram. Pretty much all the DnD examples online require both drag and drop listeners, but it seems our drop support is limited to what we specify in the Container Drop. It feels like we're troubleshooting a black box on the drop side because there's no error or log explaining why the drop fails silently... and we have no means to supply a custom drop listener for the Sirius editor.
I looked at: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java
It seems that Sirius Diagram DnD does support LocalTransfer types and expects a tree selection for the drag source (which is a given when a tree view extends the Common Navigator Framework). Because everything fails silently it's impossible to know exactly why the editor is not recognizing the drag.
I am really hoping we can figure this out because DnD from the palette is a requirement by the customer.
[Updated on: Fri, 11 November 2016 18:20] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03785 seconds