Is there no default drag and drop behavior in an e4 application created by e(fx)clipse?

229 views Asked by At

I just created an e4 application by e(fx)clipse following this tutorial, then I added two parts in my application as following screenshot. enter image description here And then when I mess around with this application, I found that these two tabs can't be drag and drop. Theoretically speaking, every window/view should be able to be drag and drop in a SWT UI based e4 application. Can anyone tell me how to make window/view drag and drop behavior possible in such an application? Really appreciate it.

1

There are 1 answers

5
greg-449 On BEST ANSWER

Drag and drop is not part of the core of e4.

You must add the appropriate DnD addon to the Add-ons list in the Application.e4xmi to get drag and drop.

For JavaFX this is org.eclipse.fx.ui.workbench.renderers.base.addons.DnDAddon (full entry in the Application.e4xmi should be bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org‌​.eclipse.fx.ui.workb‌​ench.renderers.base.‌​addons.DnDAddon). You may also need the cleanup addon bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org‌​.eclipse.fx.ui.workb‌​ench.renderers.base.‌​addons.CleanUpAddon

For SWT it is org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon