diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java index 8ccc78db887..c41a3fb6d4f 100644 --- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java +++ b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java @@ -279,7 +279,7 @@ public class RSEFileStoreImpl extends FileStore "Could not get remote file")); } try { - remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, _parent.getName()); + remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, _parent.getName(), monitor); } catch(Exception e) { throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), @@ -290,7 +290,7 @@ public class RSEFileStoreImpl extends FileStore IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(_parent.getHost(), monitor); try { //TODO method missing a progressmonitor! - remoteFile = subSys.getRemoteFileObject(_parent.getAbsolutePath()); + remoteFile = subSys.getRemoteFileObject(_parent.getAbsolutePath(), monitor); } catch (Exception e) { throw new CoreException(new Status( @@ -536,7 +536,7 @@ public class RSEFileStoreImpl extends FileStore IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem(); if (!remoteFile.exists()) { try { - remoteFile = subSys.createFolder(remoteFile); + remoteFile = subSys.createFolder(remoteFile, monitor); } catch (Exception e) { throw new CoreException(new Status(IStatus.ERROR, @@ -570,7 +570,7 @@ public class RSEFileStoreImpl extends FileStore IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem(); if (!remoteFile.exists()) { try { - remoteFile = subSys.createFile(remoteFile); + remoteFile = subSys.createFile(remoteFile, monitor); } catch (Exception e) { throw new CoreException(new Status(IStatus.ERROR, diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileSystemContributor.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileSystemContributor.java index 7ae07af0236..38644958038 100644 --- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileSystemContributor.java +++ b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileSystemContributor.java @@ -23,6 +23,7 @@ package org.eclipse.rse.internal.eclipse.filesystem; import java.net.URI; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.window.Window; import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.model.IHost; @@ -47,7 +48,7 @@ public class RSEFileSystemContributor extends FileSystemContributor { URI uri = new URI(initialPath); IHost host = RSEFileStoreImpl.getConnectionFor(uri.getHost(), null); IRemoteFileSubSystem fs = RSEFileStoreImpl.getRemoteFileSubSystem(host); - dlg.setInputObject(fs.getRemoteFileObject(uri.getPath())); + dlg.setInputObject(fs.getRemoteFileObject(uri.getPath(), new NullProgressMonitor())); } catch (Exception e) { } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/CombineDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/CombineDialog.java index f4a8dd302fa..d620c5e183d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/CombineDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/CombineDialog.java @@ -15,6 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.dialogs; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.internal.files.ui.widgets.CombineForm; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; @@ -109,7 +110,7 @@ public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog { try { // return a remote file that is the child of the parent folder - return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName); + return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName, new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SaveAsDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SaveAsDialog.java index b9d165293f5..6b720f8f744 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SaveAsDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SaveAsDialog.java @@ -16,6 +16,7 @@ package org.eclipse.rse.files.ui.dialogs; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.files.ui.widgets.SaveAsForm; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; @@ -80,7 +81,7 @@ public class SaveAsDialog extends SystemSelectRemoteFileOrFolderDialog implement try { - return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, form.getFileName()); + return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, form.getFileName(), new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java index 769b46ed724..ec31e2559e1 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java @@ -330,7 +330,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP try { if (remotePath != null && fs instanceof IRemoteFileSubSystem) { - IRemoteFile remoteFile = ((IRemoteFileSubSystem)fs).getRemoteFileObject(remotePath); + IRemoteFile remoteFile = ((IRemoteFileSubSystem)fs).getRemoteFileObject(remotePath, new NullProgressMonitor()); if (remoteFile != null) { return new SystemEditableRemoteFile(remoteFile); @@ -525,7 +525,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP // get updated remoteFile so we get the current remote timestamp //remoteFile.markStale(true); - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor); // get the remote modified stamp long remoteModifiedStamp = remoteFile.getLastModified(); @@ -604,7 +604,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP return false; } - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor); refresh(); @@ -649,7 +649,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP // reget the remote file so that we have the right timestamps try { - remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } catch (Exception e) { @@ -681,7 +681,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP SystemIFileProperties properties = new SystemIFileProperties(file); //DKM- saveAS fix - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); properties.setRemoteFileTimeStamp(remoteFile.getLastModified()); } @@ -1053,7 +1053,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP // ensure the file is stale remoteFile.markStale(true, false); { - remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } if (!remoteFile.exists()) @@ -1088,7 +1088,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP else { // we do not have write access - IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath); + IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath, new NullProgressMonitor()); if (!fakeRemoteFile.exists()) { // this could be because file doesn't exist download(shell); @@ -1173,7 +1173,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP // ensure the file is stale remoteFile.markStale(true, false); { - remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), monitor); } if (!remoteFile.exists()) @@ -1210,7 +1210,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP else { // we do not have write access - IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath); + IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath, monitor); if (!fakeRemoteFile.exists()) { // this could be because file doesn't exist download(monitor); @@ -1498,7 +1498,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP remoteFile.markStale(true); // make sure we get the latest remote file (with proper permissions and all) try { - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java index 2889bcbf649..c12471576d9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java @@ -158,14 +158,14 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener try { - IRemoteFile remoteFile = fs.getRemoteFileObject(resourceId); + IRemoteFile remoteFile = fs.getRemoteFileObject(resourceId, monitor); if (remoteFile != null) { // make sure we have uptodate file remoteFile.markStale(true); - remoteFile = fs.getRemoteFileObject(resourceId); + remoteFile = fs.getRemoteFileObject(resourceId, monitor); // get modification stamp and dirty state long storedModifiedStamp = properties.getRemoteFileTimeStamp(); @@ -269,7 +269,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener registry.fireEvent(new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH, null)); } - remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor); registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, remoteFile)); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java index 2aaed81235f..5bb4ccd13ab 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java @@ -456,7 +456,7 @@ public class UniversalFileTransferUtility String path = properties.getRemoteFilePath(); if (path != null) { - IRemoteFile remoteFile = ss.getRemoteFileObject(path); + IRemoteFile remoteFile = ss.getRemoteFileObject(path, new NullProgressMonitor()); if (remoteFile != null && !remoteFile.exists()) { // this must be old so we should delete this @@ -953,7 +953,7 @@ public class UniversalFileTransferUtility { try { - targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath()); + targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor); } catch (Exception e) { @@ -998,7 +998,7 @@ public class UniversalFileTransferUtility SystemRemoteResourceSet existingFiles = null; try { - existingFiles = targetFS.getRemoteFileObjects(newFilePathList); + existingFiles = targetFS.getRemoteFileObjects(newFilePathList, monitor); } catch (Exception e) { @@ -1120,7 +1120,7 @@ public class UniversalFileTransferUtility IRemoteFile newTargetFolder = (IRemoteFile)existingFiles.get(newPath); if (!newTargetFolder.exists()) { - newTargetFolder = targetFS.createFolder(newTargetFolder); + newTargetFolder = targetFS.createFolder(newTargetFolder, monitor); } @@ -1163,7 +1163,7 @@ public class UniversalFileTransferUtility try { - resultSet = targetFS.getRemoteFileObjects(newFilePathList); + resultSet = targetFS.getRemoteFileObjects(newFilePathList, monitor); } catch (Exception e) { @@ -1191,7 +1191,7 @@ public class UniversalFileTransferUtility { try { - targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath()); + targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor); } catch (Exception e) { @@ -1269,7 +1269,7 @@ public class UniversalFileTransferUtility targetFS.upload(srcFileLocation, srcCharSet, newPath, targetFS.getRemoteEncoding(), monitor); - IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name); + IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor); // should check preference first @@ -1322,12 +1322,12 @@ public class UniversalFileTransferUtility // recursively copy try { - IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath); + IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor); if (!newTargetFolder.exists()) { - targetFS.createFolder(newTargetFolder); + targetFS.createFolder(newTargetFolder, monitor); newTargetFolder.markStale(true); - newTargetFolder = targetFS.getRemoteFileObject(newPath); + newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor); } @@ -1393,7 +1393,7 @@ public class UniversalFileTransferUtility { monitor.beginTask(FileResources.RESID_SUPERTRANSFER_PROGMON_MAIN,IProgressMonitor.UNKNOWN); monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_CREATE); - destinationArchive = getLocalFileSubSystem().getRemoteFileObject(File.createTempFile("supertransfer", getArchiveExtensionFromProperties()).getAbsolutePath()); //$NON-NLS-1$ + destinationArchive = getLocalFileSubSystem().getRemoteFileObject(File.createTempFile("supertransfer", getArchiveExtensionFromProperties()).getAbsolutePath(), monitor); //$NON-NLS-1$ FileServiceSubSystem localSS = (FileServiceSubSystem)getLocalFileSubSystem(); try { @@ -1403,7 +1403,7 @@ public class UniversalFileTransferUtility { } - localSS.createFile(destinationArchive); + localSS.createFile(destinationArchive, monitor); if (destinationArchive == null) { @@ -1415,7 +1415,7 @@ public class UniversalFileTransferUtility } IRemoteFile newTargetParent = newTargetFolder.getParentRemoteFile(); monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE); - IRemoteFile sourceDir = localSS.getRemoteFileObject(directory.getLocation().toOSString()); + IRemoteFile sourceDir = localSS.getRemoteFileObject(directory.getLocation().toOSString(), monitor); IRemoteFileSubSystem targetFS = newTargetFolder.getParentRemoteFileSubSystem(); @@ -1428,11 +1428,11 @@ public class UniversalFileTransferUtility // copy local zip to remote targetFS.upload(destinationArchive.getAbsolutePath(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$ - IRemoteFile remoteArchive = targetFS.getRemoteFileObject(newPath); + IRemoteFile remoteArchive = targetFS.getRemoteFileObject(newPath, monitor); monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT); String compressedFolderPath = newPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR + directory.getName(); - IRemoteFile compressedFolder = targetFS.getRemoteFileObject(compressedFolderPath); + IRemoteFile compressedFolder = targetFS.getRemoteFileObject(compressedFolderPath, monitor); // extract the compressed folder from the temp archive on remote targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor); @@ -1487,7 +1487,7 @@ public class UniversalFileTransferUtility else { IResource child = children[i]; - IRemoteFile newtarget = target.getParentRemoteFileSubSystem().getRemoteFileObject(target, child.getName()); + IRemoteFile newtarget = target.getParentRemoteFileSubSystem().getRemoteFileObject(target, child.getName(), monitor); if (!newtarget.exists()) return; transferProperties(child, newtarget, monitor); } @@ -1537,12 +1537,12 @@ public class UniversalFileTransferUtility try { String destArchPath = destinationParent.getAbsolutePath() + separator + file.getName(); - destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath); + destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath, monitor); if (destinationArchive.exists()) { directory.getParentRemoteFileSubSystem().delete(destinationArchive, monitor); } - directory.getParentRemoteFileSubSystem().createFile(destinationArchive); + directory.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor); } catch (RemoteFileSecurityException e) { @@ -1551,11 +1551,11 @@ public class UniversalFileTransferUtility } if (destinationArchive == null) { - String homeFolder = directory.getParentRemoteFileSubSystem().getRemoteFileObject("./").getAbsolutePath(); //$NON-NLS-1$ + String homeFolder = directory.getParentRemoteFileSubSystem().getRemoteFileObject("./", monitor).getAbsolutePath(); //$NON-NLS-1$ String destArchPath = homeFolder + separator + file.getName(); - destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath); + destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath, monitor); if (destinationArchive.exists()) directory.getParentRemoteFileSubSystem().delete(destinationArchive,monitor); - destinationArchive = directory.getParentRemoteFileSubSystem().createFile(destinationArchive); + destinationArchive = directory.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor); } targetResource = getTempFileFor(directory); @@ -1571,14 +1571,14 @@ public class UniversalFileTransferUtility monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE); IRemoteFileSubSystem sourceFS = directory.getParentRemoteFileSubSystem(); - IRemoteFile sourceDir = sourceFS.getRemoteFileObject(directory.getAbsolutePath()); + IRemoteFile sourceDir = sourceFS.getRemoteFileObject(directory.getAbsolutePath(), monitor); // DKM - copy src dir to remote temp archive sourceFS.copy(sourceDir, destinationArchive, sourceDir.getName(), monitor); destinationArchive.markStale(true); // reget it so that it's properties (namely "size") are correct - cpdest = destinationArchive = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(destinationArchive.getAbsolutePath()); + cpdest = destinationArchive = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(destinationArchive.getAbsolutePath(), monitor); monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_TRANSFER); String name = destinationArchive.getName(); @@ -1597,7 +1597,7 @@ public class UniversalFileTransferUtility { if (arcContents[i].isDirectory && handler.getVirtualChildren(arcContents[i].fullName) == null) continue; String currentTargetPath = targetResource.getParent().getLocation().toOSString() + localSS.getSeparator() + useLocalSeparator(arcContents[i].fullName); - IRemoteFile currentTarget = localSS.getRemoteFileObject(currentTargetPath); + IRemoteFile currentTarget = localSS.getRemoteFileObject(currentTargetPath, monitor); boolean replace = false; if (currentTarget != null && currentTarget.exists()) @@ -1621,7 +1621,7 @@ public class UniversalFileTransferUtility if (!monitor.isCanceled()) { String currentSourcePath = dest.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + arcContents[i].fullName; - IRemoteFile currentSource = localSS.getRemoteFileObject(currentSourcePath); + IRemoteFile currentSource = localSS.getRemoteFileObject(currentSourcePath, monitor); boolean shouldExtract = currentSource.isFile(); if (!shouldExtract) @@ -2078,7 +2078,7 @@ public class UniversalFileTransferUtility { IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem(); - final IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName); + final IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName, new NullProgressMonitor()); //RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); //RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java index 92f183a180c..7b6db3cc564 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java @@ -16,6 +16,7 @@ package org.eclipse.rse.files.ui.widgets; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.internal.files.ui.FileResources; @@ -107,7 +108,7 @@ public class SaveAsForm extends SystemSelectRemoteFileOrFolderForm { IRemoteFile saveasFile = null; try { - saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName); + saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName, new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java index 51988c5d8eb..e8584c48cdf 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java @@ -16,6 +16,7 @@ package org.eclipse.rse.files.ui.widgets; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.internal.files.ui.FileResources; @@ -102,7 +103,7 @@ public class SystemEnterOrSelectRemoteFileForm extends SystemSelectRemoteFileOrF IRemoteFile saveasFile = null; try { - saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName); + saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName, new NullProgressMonitor()); } catch (Exception e) { } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java index 5b2f687d47b..203a51286cd 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java @@ -19,6 +19,7 @@ package org.eclipse.rse.files.ui.widgets; import java.util.Hashtable; import java.util.ResourceBundle; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemProfile; @@ -621,7 +622,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite } } if (ss.isConnected()) - remoteFolder = ss.getRemoteFileObject(dirName); + remoteFolder = ss.getRemoteFileObject(dirName, new NullProgressMonitor()); return remoteFolder; } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java index d90cce291ea..adebc288625 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java @@ -19,6 +19,7 @@ import java.util.Iterator; import java.util.ResourceBundle; import java.util.Vector; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.model.IHost; @@ -521,7 +522,7 @@ public class SystemRemoteFolderCombo extends Composite implements ISystemCombo { IRemoteFile currentFolderObject = null; try { - currentFolderObject = fileSubSystem.getRemoteFileObject(currentFolder); + currentFolderObject = fileSubSystem.getRemoteFileObject(currentFolder, new NullProgressMonitor()); } catch(SystemMessageException e) { SystemBasePlugin.logError("SystemRemoteFolderCombo.wdigetSelected", e); //$NON-NLS-1$ } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemAddToArchiveAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemAddToArchiveAction.java index ea6f54f0d6c..8df8c2cf28b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemAddToArchiveAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemAddToArchiveAction.java @@ -23,6 +23,7 @@ import java.util.Vector; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; @@ -145,7 +146,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction try { - if (!destinationArchive.exists()) destSS.createFile(destinationArchive); + if (!destinationArchive.exists()) destSS.createFile(destinationArchive, new NullProgressMonitor()); } catch (SystemMessageException e) { @@ -168,6 +169,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction public void addToArchive(IRemoteFile source, IRemoteFile destinationArchive, boolean saveFullPathInfo, String relativeTo) { + IProgressMonitor monitor = new NullProgressMonitor(); IRemoteFile destination = null; if (destinationArchive == null) @@ -192,7 +194,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction } try { - if (!destinationArchive.exists()) destinationArchive.getParentRemoteFileSubSystem().createFile(destinationArchive); + if (!destinationArchive.exists()) destinationArchive.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor); } catch (SystemMessageException e) { @@ -212,10 +214,10 @@ public class SystemAddToArchiveAction extends SystemBaseAction String newDestinationPath = destinationArchive.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + destinationVirtualDirectory; try { - destination = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(newDestinationPath); + destination = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(newDestinationPath, monitor); if (!destination.exists()) { - destinationArchive.getParentRemoteFileSubSystem().createFolders(destination); + destinationArchive.getParentRemoteFileSubSystem().createFolders(destination, monitor); } } catch (SystemMessageException e) diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCombineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCombineAction.java index 685f3e636ec..049b62878c1 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCombineAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCombineAction.java @@ -16,6 +16,8 @@ ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.core.events.ISystemRemoteChangeEvents; import org.eclipse.rse.core.events.ISystemResourceChangeEvents; @@ -107,12 +109,13 @@ public class SystemCombineAction extends SystemExtractToAction { try { - if (!destination.exists()) destSS.createFile(destination); + if (!destination.exists()) destSS.createFile(destination, new NullProgressMonitor()); } catch (SystemMessageException e) { System.out.println(e.getMessage()); } + IProgressMonitor monitor = new NullProgressMonitor(); for (int i = 0; i < _selected.size(); i++) { IRemoteFile selection = (IRemoteFile) _selected.get(i); @@ -128,12 +131,12 @@ public class SystemCombineAction extends SystemExtractToAction { IRemoteFile nextDestination = null; try { - while (destSS.getRemoteFileObject(nextDest).exists()) + while (destSS.getRemoteFileObject(nextDest, monitor).exists()) { nextDest = nextDest + "1"; //$NON-NLS-1$ } - nextDestination = destSS.getRemoteFileObject(nextDest); - destSS.createFolder(nextDestination); + nextDestination = destSS.getRemoteFileObject(nextDest, monitor); + destSS.createFolder(nextDestination, monitor); } catch (SystemMessageException e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemConvertAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemConvertAction.java index 77029db5880..47af3088687 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemConvertAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemConvertAction.java @@ -16,6 +16,7 @@ ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.core.events.ISystemRemoteChangeEvents; import org.eclipse.rse.core.events.ISystemResourceChangeEvents; @@ -142,7 +143,7 @@ public class SystemConvertAction extends SystemExtractToAction { continue; } } - destSS.createFile(destination); + destSS.createFile(destination, new NullProgressMonitor()); } catch (SystemMessageException e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java index 016265ffdff..9a41a84775c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java @@ -20,6 +20,7 @@ import java.util.Vector; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; @@ -144,7 +145,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction targetFolder = (IRemoteFile)targetContainer; ss = targetFolder.getParentRemoteFileSubSystem(); - targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName); + targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName, monitor); //RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); @@ -259,8 +260,8 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction else { - IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath); - targetFS.createFolder(newTargetFolder); + IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor); + targetFS.createFolder(newTargetFolder, monitor); IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor); if (children != null) { @@ -398,6 +399,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction IRemoteFileSubSystem fileSS = targetFolder.getParentRemoteFileSubSystem(); ISystemFilterPoolReferenceManager mgr = fileSS.getSystemFilterPoolReferenceManager(); ISystemFilterPool[] pools = mgr.getReferencedSystemFilterPools(); + IProgressMonitor monitor = new NullProgressMonitor(); for (int i = 0; i < pools.length; i++) { ISystemFilterPool pool = pools[i]; @@ -416,7 +418,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction IRemoteFile par = null; try { - par = fileSS.getRemoteFileObject(str); + par = fileSS.getRemoteFileObject(str, monitor); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java index f12d212c392..1e0e146d6b1 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java @@ -17,6 +17,7 @@ package org.eclipse.rse.internal.files.ui.actions; import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; @@ -101,7 +102,7 @@ public class SystemEditFileAction extends SystemBaseAction { IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem(); try { - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java index f5604cd915c..cffad7c93c9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java @@ -19,6 +19,7 @@ package org.eclipse.rse.internal.files.ui.actions; import java.util.Iterator; import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; @@ -121,7 +122,7 @@ public class SystemEditFilesAction extends SystemBaseAction { IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem(); try { - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemExtractAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemExtractAction.java index 440ae9059c8..e9e534cad82 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemExtractAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemExtractAction.java @@ -22,6 +22,7 @@ import java.util.List; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; @@ -83,6 +84,7 @@ public class SystemExtractAction extends SystemBaseAction public void run() { + IProgressMonitor monitor = new NullProgressMonitor(); for (int i = 0; i < _selected.size(); i++) { IRemoteFile selection = (IRemoteFile) _selected.get(i); @@ -92,8 +94,8 @@ public class SystemExtractAction extends SystemBaseAction IRemoteFile destination = null; try { - destination = ss.getRemoteFileObject(destinationParent.getAbsolutePath() + destinationParent.getSeparator() + newName); - ss.createFolder(destination); + destination = ss.getRemoteFileObject(destinationParent.getAbsolutePath() + destinationParent.getSeparator() + newName, monitor); + ss.createFolder(destination, monitor); } catch (SystemMessageException e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java index f246e8bf196..31d91807090 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java @@ -23,6 +23,7 @@ import java.util.Comparator; import java.util.Hashtable; import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.action.ContributionItem; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; @@ -232,7 +233,7 @@ private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile r IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem(); try { - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSelectAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSelectAction.java index 06a7b00c0e6..f30d94cc9ff 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSelectAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSelectAction.java @@ -15,6 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.model.IHost; @@ -207,7 +208,7 @@ public class SystemRemoteFileSelectAction extends SystemBaseDialogAction { try { - IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath); + IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath, new NullProgressMonitor()); if (rootFolder != null) { setPreSelection(rootFolder); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java index 37aefaa8180..cbfb16fece0 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java @@ -19,6 +19,7 @@ package org.eclipse.rse.internal.files.ui.actions; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.window.Window; @@ -88,7 +89,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn { if (!_saveasFile.exists()) { - _saveasFile = fs.createFile(_saveasFile); + _saveasFile = fs.createFile(_saveasFile, monitor); } } catch (SystemMessageException e) @@ -180,7 +181,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn SystemIFileProperties properties = new SystemIFileProperties(_tempFile); fs.upload(_tempFile.getLocation().makeAbsolute().toOSString(), _remoteFile, SystemEncodingUtil.ENCODING_UTF_8, monitor); _remoteFile.markStale(true); - _remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath()); + _remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath(), new NullProgressMonitor()); properties.setRemoteFileTimeStamp(_remoteFile.getLastModified()); properties.setDirty(false); } @@ -500,7 +501,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn { try { - _saveasFile = _saveasFile.getParentRemoteFileSubSystem().getRemoteFileObject(_saveasFile.getAbsolutePath()); + _saveasFile = _saveasFile.getParentRemoteFileSubSystem().getRemoteFileObject(_saveasFile.getAbsolutePath(), new NullProgressMonitor()); RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_saveasFile.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH, null)); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java index f346b04f409..457dc847c96 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.DialogPage; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.text.ITextSelection; @@ -642,7 +643,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage { IRemoteFile remoteFile; try { - remoteFile = subsys.getRemoteFileObject(data.folderName); + remoteFile = subsys.getRemoteFileObject(data.folderName, new NullProgressMonitor()); } catch (SystemMessageException e) { // TODO: show error diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index 2a3ceb14da4..6ecf9252648 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -1757,7 +1757,7 @@ public class SystemViewRemoteFileAdapter try { //targetFolder.markStale(true); - targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath()); + targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor); } catch (Exception e) { @@ -1896,7 +1896,7 @@ public class SystemViewRemoteFileAdapter { // should be better doing a query for all in the set - IRemoteFile existingFileOrFolder = ((IRemoteFileSubSystem)srcSubSystem).getRemoteFileObject(targetFolder, name); + IRemoteFile existingFileOrFolder = ((IRemoteFileSubSystem)srcSubSystem).getRemoteFileObject(targetFolder, name, monitor); if (existingFileOrFolder.exists()) { RenameRunnable rr = new RenameRunnable(existingFileOrFolder); @@ -1944,7 +1944,7 @@ public class SystemViewRemoteFileAdapter { if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor)) { - IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name); + IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor); resultSet.addResource(copiedFile); } else @@ -1975,7 +1975,7 @@ public class SystemViewRemoteFileAdapter { for (int x = 0; x < toCopyBatch.size(); x++) { - IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, srcFileOrFolders[x].getName()); + IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, srcFileOrFolders[x].getName(), monitor); resultSet.addResource(copiedFile); } } @@ -2023,7 +2023,7 @@ public class SystemViewRemoteFileAdapter try { //targetFolder.markStale(true); - targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath()); + targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor); } catch (Exception e) { @@ -2052,7 +2052,7 @@ public class SystemViewRemoteFileAdapter try { if (localFS != null) { - IRemoteFile srcFileOrFolder = localFS.getRemoteFileObject((String)src); + IRemoteFile srcFileOrFolder = localFS.getRemoteFileObject((String)src, monitor); return doDrop(srcFileOrFolder, target, true, sameSystem, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE, monitor); } else { @@ -2155,7 +2155,7 @@ public class SystemViewRemoteFileAdapter { if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath())) { - IRemoteFile existingFileOrFolder = localFS.getRemoteFileObject(targetFolder, name); + IRemoteFile existingFileOrFolder = localFS.getRemoteFileObject(targetFolder, name, monitor); if (existingFileOrFolder.exists()) { @@ -2169,7 +2169,7 @@ public class SystemViewRemoteFileAdapter monitor.subTask(copyMessage.getLevelOneText()); if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor)) { - IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name); + IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor); return copiedFile; } @@ -2208,7 +2208,7 @@ public class SystemViewRemoteFileAdapter monitor.subTask(copyMessage.getLevelOneText()); targetFS.upload(srcFileOrFolder.getAbsolutePath(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$ - result = targetFS.getRemoteFileObject(targetFolder, name); + result = targetFS.getRemoteFileObject(targetFolder, name, monitor); return result; } @@ -2245,8 +2245,8 @@ public class SystemViewRemoteFileAdapter String newPath = newPathBuf.toString(); - IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath); - targetFS.createFolder(newTargetFolder); + IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor); + targetFS.createFolder(newTargetFolder, monitor); IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder, monitor); if (children != null) @@ -2292,7 +2292,7 @@ public class SystemViewRemoteFileAdapter { IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem(); - IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName); + IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName, new NullProgressMonitor()); //RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); //RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); @@ -2495,7 +2495,7 @@ public class SystemViewRemoteFileAdapter { SystemEditableRemoteFile editable = (SystemEditableRemoteFile)editableObj; // there's an in-memory editable, so change the associated remote file - IRemoteFile newRemoteFile = ss.getRemoteFileObject(remotePath); + IRemoteFile newRemoteFile = ss.getRemoteFileObject(remotePath, new NullProgressMonitor()); editable.setRemoteFile(newRemoteFile); } } @@ -2526,7 +2526,7 @@ public class SystemViewRemoteFileAdapter localResource = UniversalFileTransferUtility.getTempFileFor(file); } - ss.rename(file, newName); + ss.rename(file, newName, new NullProgressMonitor()); if (localResource != null && localResource.exists()) { @@ -2902,7 +2902,7 @@ public class SystemViewRemoteFileAdapter IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem(); try { - remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath()); + remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor()); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java index 26835dc0f6e..215b732b619 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java @@ -18,6 +18,8 @@ package org.eclipse.rse.internal.files.ui.wizards; import java.util.Vector; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.events.ISystemRemoteChangeEvents; @@ -167,10 +169,11 @@ public class SystemNewFileWizard return false; } // ok, proceed with actual creation... - IRemoteFile newFile = null; + IRemoteFile newFile = null; + IProgressMonitor monitor = new NullProgressMonitor(); try { - IRemoteFile newFilePath = rfss.getRemoteFileObject(absName); - newFile = rfss.createFile(newFilePath); + IRemoteFile newFilePath = rfss.getRemoteFileObject(absName, monitor); + newFile = rfss.createFile(newFilePath, monitor); } catch (RemoteFileIOException exc ) { SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName); @@ -381,7 +384,7 @@ public class SystemNewFileWizard { uniqueNames.add(pathName); try { - folder = parentSubSystem.getRemoteFileObject(pathName); + folder = parentSubSystem.getRemoteFileObject(pathName, new NullProgressMonitor()); // decided to do folder existence checking when Finish pressed //if (folder.exists()) v.add(folder); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java index 152c80dd529..1e975476c6e 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java @@ -16,6 +16,8 @@ package org.eclipse.rse.internal.files.ui.wizards; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.filters.ISystemFilter; import org.eclipse.rse.core.filters.ISystemFilterReference; @@ -154,8 +156,9 @@ public class SystemNewFolderWizard IRemoteFile newFolder = null; //IRemoteFile newFolderPath = null; try { - IRemoteFile newFolderPath = rfss.getRemoteFileObject(absName); - newFolder = rfss.createFolder(newFolderPath); + IProgressMonitor monitor = new NullProgressMonitor(); + IRemoteFile newFolderPath = rfss.getRemoteFileObject(absName, monitor); + newFolder = rfss.createFolder(newFolderPath, monitor); } catch (RemoteFileIOException exc ) { SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (exc.getRemoteException() instanceof SystemMessageException) diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java index 4885ff0a18a..76f534428ad 100644 --- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java +++ b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java @@ -23,6 +23,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; import org.eclipse.rse.core.SystemBasePlugin; @@ -144,7 +145,7 @@ public class RemoteFileImportDescriptionReader implements IRemoteFileImportDescr if (path != null && subsystem != null) { IRemoteFile remoteFile = null; try { - remoteFile = subsystem.getRemoteFileObject(path); + remoteFile = subsystem.getRemoteFileObject(path, new NullProgressMonitor()); if (remoteFile != null && remoteFile.exists()) { UniFilePlus file = new UniFilePlus(remoteFile); selectedElements.add(file); diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java index 3ee8da9d622..9b79f8a2c59 100644 --- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java +++ b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java @@ -65,7 +65,7 @@ public class UniFilePlus extends File { public boolean createNewFile() throws IOException { IRemoteFile newFile = null; try { - newFile = remoteFile.getParentRemoteFileSubSystem().createFile(remoteFile); + newFile = remoteFile.getParentRemoteFileSubSystem().createFile(remoteFile, new NullProgressMonitor()); } catch (RemoteFileException exc) { Exception e = exc.getRemoteException(); if (e != null) { @@ -88,7 +88,7 @@ public class UniFilePlus extends File { public boolean delete() { boolean ok = true; try { - ok = remoteFile.getParentRemoteFileSubSystem().delete(remoteFile, null); + ok = remoteFile.getParentRemoteFileSubSystem().delete(remoteFile, new NullProgressMonitor()); //hmm, should we set remoteFile to null? } catch (RemoteFileException exc) { Exception e = exc.getRemoteException(); @@ -280,7 +280,7 @@ public class UniFilePlus extends File { public boolean mkdir() { IRemoteFile dir = null; try { - if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile); + if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile, new NullProgressMonitor()); } catch (RemoteFileException exc) { Exception e = exc.getRemoteException(); if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e; @@ -293,7 +293,7 @@ public class UniFilePlus extends File { public boolean mkdirs() { IRemoteFile dir = null; try { - if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile); + if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile, new NullProgressMonitor()); } catch (RemoteFileException exc) { Exception e = exc.getRemoteException(); if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e; @@ -306,7 +306,7 @@ public class UniFilePlus extends File { public boolean renameTo(File dest) { boolean ok = false; try { - ok = remoteFile.getParentRemoteFileSubSystem().rename(remoteFile, dest.getName()); + ok = remoteFile.getParentRemoteFileSubSystem().rename(remoteFile, dest.getName(), new NullProgressMonitor()); } catch (RemoteFileException exc) { Exception e = exc.getRemoteException(); if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e; diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java index 5fab2452f6a..d3bff1815c8 100644 --- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java +++ b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java @@ -11,6 +11,7 @@ *******************************************************************************/ package org.eclipse.rse.internal.importexport.files; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants; @@ -50,7 +51,7 @@ public class Utilities { path = path.replace('/', sep); } - ret = ss.getRemoteFileObject(path); + ret = ss.getRemoteFileObject(path, new NullProgressMonitor()); } catch (SystemMessageException e) { // get RemoteFileObject has been changed to raise // SystemMessageException. diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java index 51f5cecdc1e..7f6bdb0c11d 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java @@ -21,6 +21,8 @@ import java.util.HashMap; import java.util.List; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextViewer; @@ -368,7 +370,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess { try { - contextDirectory = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost()).getRemoteFileObject(contextPath); + contextDirectory = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost()).getRemoteFileObject(contextPath, new NullProgressMonitor()); _lastFolderContext = contextDirectory; } catch (Exception e) @@ -497,7 +499,8 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess IRemoteFileSubSystem fs = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost()); try { - IRemoteFile parent = fs.getRemoteFileObject(parentPath); + IProgressMonitor monitor = new NullProgressMonitor(); + IRemoteFile parent = fs.getRemoteFileObject(parentPath, monitor); Object[] fileList = null; @@ -507,7 +510,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess } else { - fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", null); //$NON-NLS-1$ + fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", monitor); //$NON-NLS-1$ } diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java index 416e6e249da..d48e8f6d94d 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java @@ -17,6 +17,7 @@ package org.eclipse.rse.internal.subsystems.files.core.model; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemProfile; @@ -248,7 +249,7 @@ public class RemotePath implements IRemotePath { IRemoteFile remoteFile = null; try { - remoteFile = subsys.getRemoteFileObject(absolutePath); + remoteFile = subsys.getRemoteFileObject(absolutePath, new NullProgressMonitor()); } catch (SystemMessageException e) { SystemBasePlugin.logError("Error occured trying to get remote file", e); //$NON-NLS-1$ diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java index 155ece98de4..d03cfced681 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java @@ -134,7 +134,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I * @return an IRemoteFile object for the file. * @see IRemoteFile */ - public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException + public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException { String fullPath = parent.getAbsolutePath() + getSeparator() + folderOrFileName; IRemoteFile file = getCachedRemoteFile(fullPath); @@ -143,7 +143,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I return file; } - IHostFile node = getFile(null, parent.getAbsolutePath(), folderOrFileName); + IHostFile node = getFile(monitor, parent.getAbsolutePath(), folderOrFileName); return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node); } @@ -154,7 +154,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I * @return The constructed IRemoteFile * @see IRemoteFile */ - public IRemoteFile getRemoteFileObject(String folderOrFileName) throws SystemMessageException + public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException { String fofName = folderOrFileName; if (folderOrFileName.length() > 1) @@ -222,7 +222,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$ String name = fofName.substring(lastSep + 1, fofName.length()); - IHostFile node = getFile(new NullProgressMonitor(), parentPath, name); + IHostFile node = getFile(monitor, parentPath, name); if (node != null) { IRemoteFile parent = null; @@ -595,11 +595,11 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I return false; } - public IRemoteFile getParentFolder(IRemoteFile folderOrFile) + public IRemoteFile getParentFolder(IRemoteFile folderOrFile, IProgressMonitor monitor) { try { - return getRemoteFileObject(folderOrFile.getParentPath()); + return getRemoteFileObject(folderOrFile.getParentPath(), monitor); } catch (Exception e) { @@ -607,7 +607,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I } } - public IRemoteFile createFile(IRemoteFile fileToCreate) throws RemoteFileSecurityException, RemoteFileIOException + public IRemoteFile createFile(IRemoteFile fileToCreate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException { IFileService service = getFileService(); String parent = fileToCreate.getParentPath(); @@ -629,7 +629,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), fileToCreate.getParentRemoteFile(), newFile); } - public IRemoteFile createFolder(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException + public IRemoteFile createFolder(IRemoteFile folderToCreate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException { IFileService service = getFileService(); String parent = folderToCreate.getParentPath(); @@ -648,9 +648,9 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), folderToCreate.getParentRemoteFile(), newFolder); } - public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException + public IRemoteFile createFolders(IRemoteFile folderToCreate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException { - return createFolder(folderToCreate); + return createFolder(folderToCreate, monitor); } public boolean delete(IRemoteFile folderOrFile, IProgressMonitor monitor) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException @@ -700,7 +700,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I return result; } - public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileSecurityException, RemoteFileIOException + public boolean rename(IRemoteFile folderOrFile, String newName, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException { boolean result = false; removeCachedRemoteFile(folderOrFile); diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java index cd6a2ac11f1..bf471e0bea7 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java @@ -206,8 +206,11 @@ public interface IRemoteFileSubSystem extends ISubSystem { /** * Given a folder or file, return its parent folder object. * @param folderOrFile folder or file to return parent of. + * @param monitor the progress monitor + * + * @return the remote file */ - public IRemoteFile getParentFolder(IRemoteFile folderOrFile); + public IRemoteFile getParentFolder(IRemoteFile folderOrFile, IProgressMonitor monitor); /** * Given a folder or file, return its parent folder name, fully qualified @@ -240,8 +243,11 @@ public interface IRemoteFileSubSystem extends ISubSystem { /** * Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it. * @param folderOrFileNames Fully qualified folder or file names + * @param monitor the progress monitor + * + * @return the set of resources */ - public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames) throws SystemMessageException; + public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames, IProgressMonitor monitor) throws SystemMessageException; /** * Given a fully qualified file or folder name, return an IRemoteFile @@ -251,19 +257,23 @@ public interface IRemoteFileSubSystem extends ISubSystem { * if the file with the given key is not found in the internal cache. *
* @param folderOrFileName Fully qualified folder or file name. + * @param monitor the progress monitor * @return the requested IRemoteFile object. * @throws SystemMessageException in case an error occurs contacting the * remote system while retrieving the requested remote object. */ - public IRemoteFile getRemoteFileObject(String folderOrFileName) throws SystemMessageException; + public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException; /** * Given a un-qualified file or folder name, and its parent folder object, * return an IRemoteFile object for the file. * @param parent Folder containing the folder or file * @param folderOrFileName Un-qualified folder or file name + * @param monitor the progress monitor + * + * @return the requested IRemoteFile object */ - public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException; + public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException; /** * Given a key, returns a search result object for it. For the key, see < @@ -280,12 +290,12 @@ public interface IRemoteFileSubSystem extends ISubSystem { *