diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java index c0a3b2ca031..3a003789d52 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2009 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 http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * David McKnight (IBM) - [254588] SystemDropActionDelegate performs refreshLocal too early ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -20,14 +21,19 @@ import java.util.ArrayList; import org.eclipse.core.resources.IProjectNature; import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.WorkspaceJob; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; +import org.eclipse.rse.internal.ui.GenericMessages; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemMessages; @@ -88,11 +94,9 @@ public class SystemDropActionDelegate implements IDropActionDelegate byte[] result = (byte[]) data; // get the sources - //StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR); String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$ ArrayList srcObjects = new ArrayList(); - //while (tokenizer.hasMoreTokens()) for (int i = 0; i 0) - { - rule = new MultiRule(rules); - } - - Viewer currentViewer = null; // todo: figure out how to determine the current viewer! Phil - SystemDNDTransferRunnable runnable = new SystemDNDTransferRunnable(rsfTarget, srcObjects, currentViewer, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE); - - runnable.setRule(rule); - - runnable.schedule(); - - if (resource != null) - { - try - { - resource.refreshLocal(IResource.DEPTH_INFINITE, null); - } - catch (CoreException e) - { - } - } - RSEUIPlugin.getTheSystemRegistryUI().clearRunnableContext(); - } - } - catch (SystemMessageException e) - { - } - **/ return true; }