Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Cross Viewer Drag & Drop (Does GEF support cross viewer drag and drop? Out of the box?)
Cross Viewer Drag & Drop [message #1806957] Sun, 19 May 2019 17:55 Go to next message
Gerhard Kreuzer is currently offline Gerhard KreuzerFriend
Messages: 5
Registered: May 2019
Junior Member
Hi there,

I'm working on an E4 RCP application (still based on Oxygen), that uses GEF Zest Viewers to display and edit Graphs (similar to signal flow charts). All Graphs of a project form a hierarchy, but are not hosted by a single viewer. (In case it helps, a bit context information: the viewers themselves are hosted by E4 (editor) parts. The application is a SWT / Java FX hybrid, where all but the GEF Zest Viewers is SWT based.)
Given this configuration, the question whether GEF supports cross viewer drag & drop arises... The desired semantics of the D&D is like Copy&Paste or Cut&Paste respectively.
Does GEF support this out of the box? Has anyone done this already?

Thanks in advance!

Re: Cross Viewer Drag & Drop [message #1808672 is a reply to message #1806957] Fri, 28 June 2019 13:01 Go to previous message
Matthias Wienand is currently offline Matthias WienandFriend
Messages: 230
Registered: March 2015
Senior Member
Hi Gerhard,

thanks to Kyle Girard, drag and drop is actually supported out of the box since 5.1.0. You can quickly test it out by adapting the MVC Logo Example as follows:

1) Bind DragDropGesture as IDomain adapter: The MvcLogoExampleModule class defines a method bindIDomainAdapters() which can be changed as follows:

	protected void bindIDomainAdapters(MapBinder<AdapterKey<?>, Object> adapterMapBinder) {

2) Set breakpoint in DragDropGesture where a DragEvent is handled.
3) Drag something into the example application and observe the DragEvent when the breakpoint is hit.

Note that there might be some problems w.r.t. getting the data out of the DragEvent etc.. However, this should be a good starting point. If needed, you can always register a SWT event filter to accommodate for shortcomings w.r.t. JavaFX drag and drop. You might be able to incorporate such extensions in a subclassed DragDropGestureEx.

Best regards,
Previous Topic:GEF 5: Allow only some Connections
Next Topic:Recursive Connection
Goto Forum:

Current Time: Sat Sep 18 07:39:58 GMT 2021

Powered by FUDForum. Page generated in 0.02063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top