From 0b8d3da3ecf95e79a7571ce21b73f1baf587d6fe Mon Sep 17 00:00:00 2001 From: David McKnight Date: Mon, 14 Mar 2011 12:58:41 +0000 Subject: [PATCH] [231971] [dnd] Drag and Drop Filter Displays Error --- .../rse/internal/ui/view/SystemDNDTransferRunnable.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java index 62087380b2e..28b997a9335 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2010 IBM Corporation and others. + * Copyright (c) 2002, 2011 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 @@ -27,6 +27,7 @@ * David McKnight (IBM) - [248922] [dnd] display error message when copy operation hits exception * Radoslav Gerganov (ProSyst) - [231428] [files] NPE on canceling copy operation from remote host * David McKnight (IBM) - [328148] Dropping resource onto Eclipse IFile causes RSEG1003U unexpected exception + * David McKnight (IBM) - [231971] [dnd] Drag and Drop Filter Displays Error *******************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -161,7 +162,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob showErrorMessage((SystemMessage) srcObject); return _ok; } - else if (srcObject != null) + else if (srcObject != null && srcObject != target) { ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) srcObject).getAdapter(ISystemDragDropAdapter.class); @@ -184,7 +185,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob srcObject instanceof ISubSystem) { SystemRemoteResourceSet set = getSetFor(srcSubSystem, srcAdapter); - set.addResource(srcObject); + set.addResource(srcObject); } } }