Drag and drop support for your parts within the workbench in Eclipse e4

Some of you may have noticed that you cannot drag and drop your parts (views and editors) within an Eclipse e4 application by default.

To make this work add a dependency to the plugin “org.eclipse.e4.ui.workbench.addons.swt” and add the Add-On “org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon” to your “Application.e4xmi”. For example you could add it via the following:

I also updated my Eclipse e4 Tutorial.

Many thanks to Tom Schindl for the tip.

[Update] The D&D in the user interface creates additional containers. To get ride of them use the Add-On platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.cleanupaddon.CleanupAddon

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse and tagged , , . Bookmark the permalink.