Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2011-04-22 12:59:19 +0000
committerRemy Suen2011-04-22 12:59:19 +0000
commitc9384efb97bdc923795ccc52b41bf9cfa81fc6d2 (patch)
treed1e72fb18e307a554449a761ac8127daa4d21673 /bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
parentd6d22c4a94be81d7392cc23c60418584139ad574 (diff)
downloadeclipse.platform.ui-c9384efb97bdc923795ccc52b41bf9cfa81fc6d2.tar.gz
eclipse.platform.ui-c9384efb97bdc923795ccc52b41bf9cfa81fc6d2.tar.xz
eclipse.platform.ui-c9384efb97bdc923795ccc52b41bf9cfa81fc6d2.zip
Bug 343634 [Compatibility] IllegalArgumentException (null argument) in WorkbenchPage.installAreaDropSupport() when not calling configureEditorAreaDropListener() in preWindowOpen()v20110422-1900
Diffstat (limited to 'bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java')
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
index 2d55f95f109..8c9c666f599 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
@@ -73,6 +73,7 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.DropTargetListener;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -2388,10 +2389,13 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
private void installAreaDropSupport(Control control) {
if (!dndSupportInstalled) {
WorkbenchWindowConfigurer configurer = legacyWindow.getWindowConfigurer();
- DropTarget dropTarget = new DropTarget(control, DND.DROP_DEFAULT | DND.DROP_COPY
- | DND.DROP_LINK);
- dropTarget.setTransfer(configurer.getTransfers());
- dropTarget.addDropListener(configurer.getDropTargetListener());
+ DropTargetListener dropTargetListener = configurer.getDropTargetListener();
+ if (dropTargetListener != null) {
+ DropTarget dropTarget = new DropTarget(control, DND.DROP_DEFAULT | DND.DROP_COPY
+ | DND.DROP_LINK);
+ dropTarget.setTransfer(configurer.getTransfers());
+ dropTarget.addDropListener(dropTargetListener);
+ }
dndSupportInstalled = true;
}
}

Back to the top