diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java index 96b7e26f238..aa09b087fe5 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java @@ -67,6 +67,7 @@ import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.progress.UIJob; +import org.eclipse.ui.progress.WorkbenchJob; /** * This class manages listening for resource changes within our temp file project @@ -229,6 +230,42 @@ public abstract class SystemTempFileListener implements IResourceChangeListener } } + /*** + * @deprecated don't use this class, it's only here because to remove it would be + * an API change, and we can't do that until 3.0. Instead of using this, + * SynchResourcesJob should be used. + */ + public class RefreshResourcesUIJob extends WorkbenchJob + { + public RefreshResourcesUIJob() + { + super(FileResources.RSEOperation_message); + } + + public IStatus runInUIThread(IProgressMonitor monitor) + { + _isSynching = true; + try { + IFile[] filesToSync; + synchronized(_changedResources) { + filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]); + _changedResources.clear(); + } + monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, IProgressMonitor.UNKNOWN); + setName(FileResources.MSG_SYNCHRONIZE_PROGRESS); + for (int i = 0; i < filesToSync.length; i++) + { + synchronizeTempWithRemote(filesToSync[i], monitor); + } + } finally { + _isSynching = false; + monitor.done(); + } + return Status.OK_STATUS; + } + } + + /** * Used for doing the upload from a job