Fixed bug 445305: [EditorMgmt] Editor dragged to new window not working
authorDani Megert <Daniel_Megert@ch.ibm.com>
Tue, 12 May 2015 12:52:25 +0000 (14:52 +0200)
committerLars Vogel <lars.vogel@vogella.com>
Tue, 12 May 2015 14:14:25 +0000 (10:14 -0400)
Change-Id: Ifb895fd55d260298645541b9c879202d81146319
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/StackDropAgent.java

index 19551f9..2343ca1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 IBM Corporation and others.
+ * Copyright (c) 2010, 2015 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import java.util.ArrayList;
 import java.util.List;
 import org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer;
 import org.eclipse.e4.ui.model.application.ui.MUIElement;
-import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
 import org.eclipse.e4.ui.model.application.ui.basic.MStackElement;
 import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
@@ -69,14 +68,15 @@ public class StackDropAgent extends DropAgent {
                if (stack == dragElement)
                        return false;
 
-               // You can only drag MParts from window to window 68
-               if (!(dragElement instanceof MPart)) {
+               // You can only drag MParts from window to window
+               // NOTE: Disabled again due to too many issues, see bug 445305 for details
+               // if (!(dragElement instanceof MPart)) {
                        EModelService ms = dndManager.getModelService();
                        MWindow dragElementWin = ms.getTopLevelWindowFor(dragElement);
                        MWindow dropWin = ms.getTopLevelWindowFor(stack);
                        if (dragElementWin != dropWin)
                                return false;
-               }
+               // }
 
                // only allow dropping into the the area
                Rectangle areaRect = getTabAreaRect((CTabFolder) stack.getWidget());