mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-14 19:55:45 +02:00
[184322] progress monitor added to file subsystem apis
This commit is contained in:
parent
cc5d054901
commit
6ecacafa7a
38 changed files with 200 additions and 172 deletions
|
@ -279,7 +279,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
"Could not get remote file"));
|
"Could not get remote file"));
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, _parent.getName());
|
remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, _parent.getName(), monitor);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR,
|
throw new CoreException(new Status(IStatus.ERROR,
|
||||||
Activator.getDefault().getBundle().getSymbolicName(),
|
Activator.getDefault().getBundle().getSymbolicName(),
|
||||||
|
@ -290,7 +290,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(_parent.getHost(), monitor);
|
IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(_parent.getHost(), monitor);
|
||||||
try {
|
try {
|
||||||
//TODO method missing a progressmonitor!
|
//TODO method missing a progressmonitor!
|
||||||
remoteFile = subSys.getRemoteFileObject(_parent.getAbsolutePath());
|
remoteFile = subSys.getRemoteFileObject(_parent.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new CoreException(new Status(
|
throw new CoreException(new Status(
|
||||||
|
@ -536,7 +536,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
|
||||||
if (!remoteFile.exists()) {
|
if (!remoteFile.exists()) {
|
||||||
try {
|
try {
|
||||||
remoteFile = subSys.createFolder(remoteFile);
|
remoteFile = subSys.createFolder(remoteFile, monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR,
|
throw new CoreException(new Status(IStatus.ERROR,
|
||||||
|
@ -570,7 +570,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
|
||||||
if (!remoteFile.exists()) {
|
if (!remoteFile.exists()) {
|
||||||
try {
|
try {
|
||||||
remoteFile = subSys.createFile(remoteFile);
|
remoteFile = subSys.createFile(remoteFile, monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR,
|
throw new CoreException(new Status(IStatus.ERROR,
|
||||||
|
|
|
@ -23,6 +23,7 @@ package org.eclipse.rse.internal.eclipse.filesystem;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.window.Window;
|
import org.eclipse.jface.window.Window;
|
||||||
import org.eclipse.rse.core.filters.ISystemFilterReference;
|
import org.eclipse.rse.core.filters.ISystemFilterReference;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
|
@ -47,7 +48,7 @@ public class RSEFileSystemContributor extends FileSystemContributor {
|
||||||
URI uri = new URI(initialPath);
|
URI uri = new URI(initialPath);
|
||||||
IHost host = RSEFileStoreImpl.getConnectionFor(uri.getHost(), null);
|
IHost host = RSEFileStoreImpl.getConnectionFor(uri.getHost(), null);
|
||||||
IRemoteFileSubSystem fs = RSEFileStoreImpl.getRemoteFileSubSystem(host);
|
IRemoteFileSubSystem fs = RSEFileStoreImpl.getRemoteFileSubSystem(host);
|
||||||
dlg.setInputObject(fs.getRemoteFileObject(uri.getPath()));
|
dlg.setInputObject(fs.getRemoteFileObject(uri.getPath(), new NullProgressMonitor()));
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.dialogs;
|
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.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
|
||||||
import org.eclipse.rse.internal.files.ui.widgets.CombineForm;
|
import org.eclipse.rse.internal.files.ui.widgets.CombineForm;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
|
@ -109,7 +110,7 @@ public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// return a remote file that is the child of the parent folder
|
// 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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.dialogs;
|
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.SaveAsForm;
|
||||||
import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
|
import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
|
@ -80,7 +81,7 @@ public class SaveAsDialog extends SystemSelectRemoteFileOrFolderDialog implement
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, form.getFileName());
|
return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, form.getFileName(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -330,7 +330,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (remotePath != null && fs instanceof IRemoteFileSubSystem) {
|
if (remotePath != null && fs instanceof IRemoteFileSubSystem) {
|
||||||
IRemoteFile remoteFile = ((IRemoteFileSubSystem)fs).getRemoteFileObject(remotePath);
|
IRemoteFile remoteFile = ((IRemoteFileSubSystem)fs).getRemoteFileObject(remotePath, new NullProgressMonitor());
|
||||||
|
|
||||||
if (remoteFile != null) {
|
if (remoteFile != null) {
|
||||||
return new SystemEditableRemoteFile(remoteFile);
|
return new SystemEditableRemoteFile(remoteFile);
|
||||||
|
@ -525,7 +525,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
|
|
||||||
// get updated remoteFile so we get the current remote timestamp
|
// get updated remoteFile so we get the current remote timestamp
|
||||||
//remoteFile.markStale(true);
|
//remoteFile.markStale(true);
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
|
||||||
|
|
||||||
// get the remote modified stamp
|
// get the remote modified stamp
|
||||||
long remoteModifiedStamp = remoteFile.getLastModified();
|
long remoteModifiedStamp = remoteFile.getLastModified();
|
||||||
|
@ -604,7 +604,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
// reget the remote file so that we have the right timestamps
|
// reget the remote file so that we have the right timestamps
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -681,7 +681,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||||
|
|
||||||
//DKM- saveAS fix
|
//DKM- saveAS fix
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
|
properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1053,7 +1053,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
// ensure the file is stale
|
// ensure the file is stale
|
||||||
remoteFile.markStale(true, false);
|
remoteFile.markStale(true, false);
|
||||||
{
|
{
|
||||||
remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!remoteFile.exists())
|
if (!remoteFile.exists())
|
||||||
|
@ -1088,7 +1088,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
else
|
else
|
||||||
{ // we do not have write access
|
{ // we do not have write access
|
||||||
|
|
||||||
IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath);
|
IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath, new NullProgressMonitor());
|
||||||
if (!fakeRemoteFile.exists())
|
if (!fakeRemoteFile.exists())
|
||||||
{ // this could be because file doesn't exist
|
{ // this could be because file doesn't exist
|
||||||
download(shell);
|
download(shell);
|
||||||
|
@ -1173,7 +1173,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
// ensure the file is stale
|
// ensure the file is stale
|
||||||
remoteFile.markStale(true, false);
|
remoteFile.markStale(true, false);
|
||||||
{
|
{
|
||||||
remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!remoteFile.exists())
|
if (!remoteFile.exists())
|
||||||
|
@ -1210,7 +1210,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
else
|
else
|
||||||
{ // we do not have write access
|
{ // we do not have write access
|
||||||
|
|
||||||
IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath);
|
IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath, monitor);
|
||||||
if (!fakeRemoteFile.exists())
|
if (!fakeRemoteFile.exists())
|
||||||
{ // this could be because file doesn't exist
|
{ // this could be because file doesn't exist
|
||||||
download(monitor);
|
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)
|
remoteFile.markStale(true); // make sure we get the latest remote file (with proper permissions and all)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -158,14 +158,14 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile remoteFile = fs.getRemoteFileObject(resourceId);
|
IRemoteFile remoteFile = fs.getRemoteFileObject(resourceId, monitor);
|
||||||
|
|
||||||
if (remoteFile != null)
|
if (remoteFile != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// make sure we have uptodate file
|
// make sure we have uptodate file
|
||||||
remoteFile.markStale(true);
|
remoteFile.markStale(true);
|
||||||
remoteFile = fs.getRemoteFileObject(resourceId);
|
remoteFile = fs.getRemoteFileObject(resourceId, monitor);
|
||||||
|
|
||||||
// get modification stamp and dirty state
|
// get modification stamp and dirty state
|
||||||
long storedModifiedStamp = properties.getRemoteFileTimeStamp();
|
long storedModifiedStamp = properties.getRemoteFileTimeStamp();
|
||||||
|
@ -269,7 +269,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener
|
||||||
registry.fireEvent(new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH, null));
|
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));
|
registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, remoteFile));
|
||||||
|
|
||||||
|
|
|
@ -456,7 +456,7 @@ public class UniversalFileTransferUtility
|
||||||
String path = properties.getRemoteFilePath();
|
String path = properties.getRemoteFilePath();
|
||||||
if (path != null)
|
if (path != null)
|
||||||
{
|
{
|
||||||
IRemoteFile remoteFile = ss.getRemoteFileObject(path);
|
IRemoteFile remoteFile = ss.getRemoteFileObject(path, new NullProgressMonitor());
|
||||||
if (remoteFile != null && !remoteFile.exists())
|
if (remoteFile != null && !remoteFile.exists())
|
||||||
{
|
{
|
||||||
// this must be old so we should delete this
|
// this must be old so we should delete this
|
||||||
|
@ -953,7 +953,7 @@ public class UniversalFileTransferUtility
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
|
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -998,7 +998,7 @@ public class UniversalFileTransferUtility
|
||||||
SystemRemoteResourceSet existingFiles = null;
|
SystemRemoteResourceSet existingFiles = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
existingFiles = targetFS.getRemoteFileObjects(newFilePathList);
|
existingFiles = targetFS.getRemoteFileObjects(newFilePathList, monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1120,7 +1120,7 @@ public class UniversalFileTransferUtility
|
||||||
IRemoteFile newTargetFolder = (IRemoteFile)existingFiles.get(newPath);
|
IRemoteFile newTargetFolder = (IRemoteFile)existingFiles.get(newPath);
|
||||||
if (!newTargetFolder.exists())
|
if (!newTargetFolder.exists())
|
||||||
{
|
{
|
||||||
newTargetFolder = targetFS.createFolder(newTargetFolder);
|
newTargetFolder = targetFS.createFolder(newTargetFolder, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1163,7 +1163,7 @@ public class UniversalFileTransferUtility
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
resultSet = targetFS.getRemoteFileObjects(newFilePathList);
|
resultSet = targetFS.getRemoteFileObjects(newFilePathList, monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1191,7 +1191,7 @@ public class UniversalFileTransferUtility
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
|
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1269,7 +1269,7 @@ public class UniversalFileTransferUtility
|
||||||
|
|
||||||
|
|
||||||
targetFS.upload(srcFileLocation, srcCharSet, newPath, targetFS.getRemoteEncoding(), monitor);
|
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
|
// should check preference first
|
||||||
|
|
||||||
|
@ -1322,12 +1322,12 @@ public class UniversalFileTransferUtility
|
||||||
// recursively copy
|
// recursively copy
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor);
|
||||||
if (!newTargetFolder.exists())
|
if (!newTargetFolder.exists())
|
||||||
{
|
{
|
||||||
targetFS.createFolder(newTargetFolder);
|
targetFS.createFolder(newTargetFolder, monitor);
|
||||||
newTargetFolder.markStale(true);
|
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.beginTask(FileResources.RESID_SUPERTRANSFER_PROGMON_MAIN,IProgressMonitor.UNKNOWN);
|
||||||
monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_CREATE);
|
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();
|
FileServiceSubSystem localSS = (FileServiceSubSystem)getLocalFileSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1403,7 +1403,7 @@ public class UniversalFileTransferUtility
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
localSS.createFile(destinationArchive);
|
localSS.createFile(destinationArchive, monitor);
|
||||||
|
|
||||||
if (destinationArchive == null)
|
if (destinationArchive == null)
|
||||||
{
|
{
|
||||||
|
@ -1415,7 +1415,7 @@ public class UniversalFileTransferUtility
|
||||||
}
|
}
|
||||||
IRemoteFile newTargetParent = newTargetFolder.getParentRemoteFile();
|
IRemoteFile newTargetParent = newTargetFolder.getParentRemoteFile();
|
||||||
monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE);
|
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();
|
IRemoteFileSubSystem targetFS = newTargetFolder.getParentRemoteFileSubSystem();
|
||||||
|
|
||||||
|
|
||||||
|
@ -1428,11 +1428,11 @@ public class UniversalFileTransferUtility
|
||||||
|
|
||||||
// copy local zip to remote
|
// copy local zip to remote
|
||||||
targetFS.upload(destinationArchive.getAbsolutePath(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
|
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);
|
monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT);
|
||||||
String compressedFolderPath = newPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR + directory.getName();
|
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
|
// extract the compressed folder from the temp archive on remote
|
||||||
targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor);
|
targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor);
|
||||||
|
@ -1487,7 +1487,7 @@ public class UniversalFileTransferUtility
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IResource child = children[i];
|
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;
|
if (!newtarget.exists()) return;
|
||||||
transferProperties(child, newtarget, monitor);
|
transferProperties(child, newtarget, monitor);
|
||||||
}
|
}
|
||||||
|
@ -1537,12 +1537,12 @@ public class UniversalFileTransferUtility
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String destArchPath = destinationParent.getAbsolutePath() + separator + file.getName();
|
String destArchPath = destinationParent.getAbsolutePath() + separator + file.getName();
|
||||||
destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath);
|
destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath, monitor);
|
||||||
if (destinationArchive.exists())
|
if (destinationArchive.exists())
|
||||||
{
|
{
|
||||||
directory.getParentRemoteFileSubSystem().delete(destinationArchive, monitor);
|
directory.getParentRemoteFileSubSystem().delete(destinationArchive, monitor);
|
||||||
}
|
}
|
||||||
directory.getParentRemoteFileSubSystem().createFile(destinationArchive);
|
directory.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor);
|
||||||
}
|
}
|
||||||
catch (RemoteFileSecurityException e)
|
catch (RemoteFileSecurityException e)
|
||||||
{
|
{
|
||||||
|
@ -1551,11 +1551,11 @@ public class UniversalFileTransferUtility
|
||||||
}
|
}
|
||||||
if (destinationArchive == null)
|
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();
|
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);
|
if (destinationArchive.exists()) directory.getParentRemoteFileSubSystem().delete(destinationArchive,monitor);
|
||||||
destinationArchive = directory.getParentRemoteFileSubSystem().createFile(destinationArchive);
|
destinationArchive = directory.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
targetResource = getTempFileFor(directory);
|
targetResource = getTempFileFor(directory);
|
||||||
|
@ -1571,14 +1571,14 @@ public class UniversalFileTransferUtility
|
||||||
|
|
||||||
monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE);
|
monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE);
|
||||||
IRemoteFileSubSystem sourceFS = directory.getParentRemoteFileSubSystem();
|
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
|
// DKM - copy src dir to remote temp archive
|
||||||
sourceFS.copy(sourceDir, destinationArchive, sourceDir.getName(), monitor);
|
sourceFS.copy(sourceDir, destinationArchive, sourceDir.getName(), monitor);
|
||||||
destinationArchive.markStale(true);
|
destinationArchive.markStale(true);
|
||||||
|
|
||||||
// reget it so that it's properties (namely "size") are correct
|
// 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);
|
monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_TRANSFER);
|
||||||
String name = destinationArchive.getName();
|
String name = destinationArchive.getName();
|
||||||
|
@ -1597,7 +1597,7 @@ public class UniversalFileTransferUtility
|
||||||
{
|
{
|
||||||
if (arcContents[i].isDirectory && handler.getVirtualChildren(arcContents[i].fullName) == null) continue;
|
if (arcContents[i].isDirectory && handler.getVirtualChildren(arcContents[i].fullName) == null) continue;
|
||||||
String currentTargetPath = targetResource.getParent().getLocation().toOSString() + localSS.getSeparator() + useLocalSeparator(arcContents[i].fullName);
|
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;
|
boolean replace = false;
|
||||||
|
|
||||||
if (currentTarget != null && currentTarget.exists())
|
if (currentTarget != null && currentTarget.exists())
|
||||||
|
@ -1621,7 +1621,7 @@ public class UniversalFileTransferUtility
|
||||||
if (!monitor.isCanceled())
|
if (!monitor.isCanceled())
|
||||||
{
|
{
|
||||||
String currentSourcePath = dest.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + arcContents[i].fullName;
|
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();
|
boolean shouldExtract = currentSource.isFile();
|
||||||
|
|
||||||
if (!shouldExtract)
|
if (!shouldExtract)
|
||||||
|
@ -2078,7 +2078,7 @@ public class UniversalFileTransferUtility
|
||||||
{
|
{
|
||||||
|
|
||||||
IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
|
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("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'");
|
||||||
//RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'");
|
//RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'");
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.widgets;
|
package org.eclipse.rse.files.ui.widgets;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||||
import org.eclipse.rse.core.SystemAdapterHelpers;
|
import org.eclipse.rse.core.SystemAdapterHelpers;
|
||||||
import org.eclipse.rse.internal.files.ui.FileResources;
|
import org.eclipse.rse.internal.files.ui.FileResources;
|
||||||
|
@ -107,7 +108,7 @@ public class SaveAsForm extends SystemSelectRemoteFileOrFolderForm {
|
||||||
IRemoteFile saveasFile = null;
|
IRemoteFile saveasFile = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName);
|
saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.widgets;
|
package org.eclipse.rse.files.ui.widgets;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||||
import org.eclipse.rse.core.SystemAdapterHelpers;
|
import org.eclipse.rse.core.SystemAdapterHelpers;
|
||||||
import org.eclipse.rse.internal.files.ui.FileResources;
|
import org.eclipse.rse.internal.files.ui.FileResources;
|
||||||
|
@ -102,7 +103,7 @@ public class SystemEnterOrSelectRemoteFileForm extends SystemSelectRemoteFileOrF
|
||||||
IRemoteFile saveasFile = null;
|
IRemoteFile saveasFile = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName);
|
saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.eclipse.rse.files.ui.widgets;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.rse.core.IRSESystemType;
|
import org.eclipse.rse.core.IRSESystemType;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.core.model.ISystemProfile;
|
import org.eclipse.rse.core.model.ISystemProfile;
|
||||||
|
@ -621,7 +622,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ss.isConnected())
|
if (ss.isConnected())
|
||||||
remoteFolder = ss.getRemoteFileObject(dirName);
|
remoteFolder = ss.getRemoteFileObject(dirName, new NullProgressMonitor());
|
||||||
return remoteFolder;
|
return remoteFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Iterator;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.rse.core.IRSESystemType;
|
import org.eclipse.rse.core.IRSESystemType;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
|
@ -521,7 +522,7 @@ public class SystemRemoteFolderCombo extends Composite implements ISystemCombo
|
||||||
{
|
{
|
||||||
IRemoteFile currentFolderObject = null;
|
IRemoteFile currentFolderObject = null;
|
||||||
try {
|
try {
|
||||||
currentFolderObject = fileSubSystem.getRemoteFileObject(currentFolder);
|
currentFolderObject = fileSubSystem.getRemoteFileObject(currentFolder, new NullProgressMonitor());
|
||||||
} catch(SystemMessageException e) {
|
} catch(SystemMessageException e) {
|
||||||
SystemBasePlugin.logError("SystemRemoteFolderCombo.wdigetSelected", e); //$NON-NLS-1$
|
SystemBasePlugin.logError("SystemRemoteFolderCombo.wdigetSelected", e); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||||
import org.eclipse.jface.operation.IRunnableContext;
|
import org.eclipse.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
|
@ -145,7 +146,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!destinationArchive.exists()) destSS.createFile(destinationArchive);
|
if (!destinationArchive.exists()) destSS.createFile(destinationArchive, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -168,6 +169,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction
|
||||||
|
|
||||||
public void addToArchive(IRemoteFile source, IRemoteFile destinationArchive, boolean saveFullPathInfo, String relativeTo)
|
public void addToArchive(IRemoteFile source, IRemoteFile destinationArchive, boolean saveFullPathInfo, String relativeTo)
|
||||||
{
|
{
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
IRemoteFile destination = null;
|
IRemoteFile destination = null;
|
||||||
|
|
||||||
if (destinationArchive == null)
|
if (destinationArchive == null)
|
||||||
|
@ -192,7 +194,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!destinationArchive.exists()) destinationArchive.getParentRemoteFileSubSystem().createFile(destinationArchive);
|
if (!destinationArchive.exists()) destinationArchive.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -212,10 +214,10 @@ public class SystemAddToArchiveAction extends SystemBaseAction
|
||||||
String newDestinationPath = destinationArchive.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + destinationVirtualDirectory;
|
String newDestinationPath = destinationArchive.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + destinationVirtualDirectory;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
destination = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(newDestinationPath);
|
destination = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(newDestinationPath, monitor);
|
||||||
if (!destination.exists())
|
if (!destination.exists())
|
||||||
{
|
{
|
||||||
destinationArchive.getParentRemoteFileSubSystem().createFolders(destination);
|
destinationArchive.getParentRemoteFileSubSystem().createFolders(destination, monitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.actions;
|
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.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
|
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
|
||||||
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
||||||
|
@ -107,12 +109,13 @@ public class SystemCombineAction extends SystemExtractToAction {
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!destination.exists()) destSS.createFile(destination);
|
if (!destination.exists()) destSS.createFile(destination, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
for (int i = 0; i < _selected.size(); i++)
|
for (int i = 0; i < _selected.size(); i++)
|
||||||
{
|
{
|
||||||
IRemoteFile selection = (IRemoteFile) _selected.get(i);
|
IRemoteFile selection = (IRemoteFile) _selected.get(i);
|
||||||
|
@ -128,12 +131,12 @@ public class SystemCombineAction extends SystemExtractToAction {
|
||||||
IRemoteFile nextDestination = null;
|
IRemoteFile nextDestination = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (destSS.getRemoteFileObject(nextDest).exists())
|
while (destSS.getRemoteFileObject(nextDest, monitor).exists())
|
||||||
{
|
{
|
||||||
nextDest = nextDest + "1"; //$NON-NLS-1$
|
nextDest = nextDest + "1"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
nextDestination = destSS.getRemoteFileObject(nextDest);
|
nextDestination = destSS.getRemoteFileObject(nextDest, monitor);
|
||||||
destSS.createFolder(nextDestination);
|
destSS.createFolder(nextDestination, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.actions;
|
package org.eclipse.rse.internal.files.ui.actions;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.operation.IRunnableContext;
|
import org.eclipse.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
|
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
|
||||||
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
||||||
|
@ -142,7 +143,7 @@ public class SystemConvertAction extends SystemExtractToAction {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
destSS.createFile(destination);
|
destSS.createFile(destination, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.Dialog;
|
import org.eclipse.jface.dialogs.Dialog;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
|
@ -144,7 +145,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
|
|
||||||
targetFolder = (IRemoteFile)targetContainer;
|
targetFolder = (IRemoteFile)targetContainer;
|
||||||
ss = targetFolder.getParentRemoteFileSubSystem();
|
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()+"'");
|
//RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'");
|
||||||
|
@ -259,8 +260,8 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor);
|
||||||
targetFS.createFolder(newTargetFolder);
|
targetFS.createFolder(newTargetFolder, monitor);
|
||||||
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
|
@ -398,6 +399,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
IRemoteFileSubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
|
||||||
ISystemFilterPoolReferenceManager mgr = fileSS.getSystemFilterPoolReferenceManager();
|
ISystemFilterPoolReferenceManager mgr = fileSS.getSystemFilterPoolReferenceManager();
|
||||||
ISystemFilterPool[] pools = mgr.getReferencedSystemFilterPools();
|
ISystemFilterPool[] pools = mgr.getReferencedSystemFilterPools();
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
for (int i = 0; i < pools.length; i++)
|
for (int i = 0; i < pools.length; i++)
|
||||||
{
|
{
|
||||||
ISystemFilterPool pool = pools[i];
|
ISystemFilterPool pool = pools[i];
|
||||||
|
@ -416,7 +418,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
IRemoteFile par = null;
|
IRemoteFile par = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
par = fileSS.getRemoteFileObject(str);
|
par = fileSS.getRemoteFileObject(str, monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
package org.eclipse.rse.internal.files.ui.actions;
|
package org.eclipse.rse.internal.files.ui.actions;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
|
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
|
||||||
|
@ -101,7 +102,7 @@ public class SystemEditFileAction extends SystemBaseAction {
|
||||||
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.eclipse.rse.internal.files.ui.actions;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
|
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
|
||||||
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
|
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
|
||||||
|
@ -121,7 +122,7 @@ public class SystemEditFilesAction extends SystemBaseAction {
|
||||||
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||||
import org.eclipse.jface.operation.IRunnableContext;
|
import org.eclipse.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
|
@ -83,6 +84,7 @@ public class SystemExtractAction extends SystemBaseAction
|
||||||
|
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
for (int i = 0; i < _selected.size(); i++)
|
for (int i = 0; i < _selected.size(); i++)
|
||||||
{
|
{
|
||||||
IRemoteFile selection = (IRemoteFile) _selected.get(i);
|
IRemoteFile selection = (IRemoteFile) _selected.get(i);
|
||||||
|
@ -92,8 +94,8 @@ public class SystemExtractAction extends SystemBaseAction
|
||||||
IRemoteFile destination = null;
|
IRemoteFile destination = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
destination = ss.getRemoteFileObject(destinationParent.getAbsolutePath() + destinationParent.getSeparator() + newName);
|
destination = ss.getRemoteFileObject(destinationParent.getAbsolutePath() + destinationParent.getSeparator() + newName, monitor);
|
||||||
ss.createFolder(destination);
|
ss.createFolder(destination, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.util.Comparator;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.action.ContributionItem;
|
import org.eclipse.jface.action.ContributionItem;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
@ -232,7 +233,7 @@ private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile r
|
||||||
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.actions;
|
package org.eclipse.rse.internal.files.ui.actions;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.Dialog;
|
import org.eclipse.jface.dialogs.Dialog;
|
||||||
import org.eclipse.rse.core.IRSESystemType;
|
import org.eclipse.rse.core.IRSESystemType;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
|
@ -207,7 +208,7 @@ public class SystemRemoteFileSelectAction extends SystemBaseDialogAction
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath);
|
IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath, new NullProgressMonitor());
|
||||||
if (rootFolder != null)
|
if (rootFolder != null)
|
||||||
{
|
{
|
||||||
setPreSelection(rootFolder);
|
setPreSelection(rootFolder);
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.eclipse.rse.internal.files.ui.actions;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.jface.window.Window;
|
import org.eclipse.jface.window.Window;
|
||||||
|
@ -88,7 +89,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
|
||||||
{
|
{
|
||||||
if (!_saveasFile.exists())
|
if (!_saveasFile.exists())
|
||||||
{
|
{
|
||||||
_saveasFile = fs.createFile(_saveasFile);
|
_saveasFile = fs.createFile(_saveasFile, monitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
|
@ -180,7 +181,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
|
SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
|
||||||
fs.upload(_tempFile.getLocation().makeAbsolute().toOSString(), _remoteFile, SystemEncodingUtil.ENCODING_UTF_8, monitor);
|
fs.upload(_tempFile.getLocation().makeAbsolute().toOSString(), _remoteFile, SystemEncodingUtil.ENCODING_UTF_8, monitor);
|
||||||
_remoteFile.markStale(true);
|
_remoteFile.markStale(true);
|
||||||
_remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath());
|
_remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
properties.setRemoteFileTimeStamp(_remoteFile.getLastModified());
|
properties.setRemoteFileTimeStamp(_remoteFile.getLastModified());
|
||||||
properties.setDirty(false);
|
properties.setDirty(false);
|
||||||
}
|
}
|
||||||
|
@ -500,7 +501,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
|
||||||
{
|
{
|
||||||
try
|
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));
|
RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_saveasFile.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH, null));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.DialogPage;
|
import org.eclipse.jface.dialogs.DialogPage;
|
||||||
import org.eclipse.jface.dialogs.IDialogSettings;
|
import org.eclipse.jface.dialogs.IDialogSettings;
|
||||||
import org.eclipse.jface.text.ITextSelection;
|
import org.eclipse.jface.text.ITextSelection;
|
||||||
|
@ -642,7 +643,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage {
|
||||||
IRemoteFile remoteFile;
|
IRemoteFile remoteFile;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
remoteFile = subsys.getRemoteFileObject(data.folderName);
|
remoteFile = subsys.getRemoteFileObject(data.folderName, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e) {
|
catch (SystemMessageException e) {
|
||||||
// TODO: show error
|
// TODO: show error
|
||||||
|
|
|
@ -1757,7 +1757,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//targetFolder.markStale(true);
|
//targetFolder.markStale(true);
|
||||||
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
|
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1896,7 +1896,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
|
|
||||||
// should be better doing a query for all in the set
|
// 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())
|
if (existingFileOrFolder.exists())
|
||||||
{
|
{
|
||||||
RenameRunnable rr = new RenameRunnable(existingFileOrFolder);
|
RenameRunnable rr = new RenameRunnable(existingFileOrFolder);
|
||||||
|
@ -1944,7 +1944,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor))
|
if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor))
|
||||||
{
|
{
|
||||||
IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
|
IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor);
|
||||||
resultSet.addResource(copiedFile);
|
resultSet.addResource(copiedFile);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1975,7 +1975,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
for (int x = 0; x < toCopyBatch.size(); x++)
|
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);
|
resultSet.addResource(copiedFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2023,7 +2023,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//targetFolder.markStale(true);
|
//targetFolder.markStale(true);
|
||||||
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
|
targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -2052,7 +2052,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (localFS != null) {
|
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);
|
return doDrop(srcFileOrFolder, target, true, sameSystem, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE, monitor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2155,7 +2155,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath()))
|
if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath()))
|
||||||
{
|
{
|
||||||
IRemoteFile existingFileOrFolder = localFS.getRemoteFileObject(targetFolder, name);
|
IRemoteFile existingFileOrFolder = localFS.getRemoteFileObject(targetFolder, name, monitor);
|
||||||
|
|
||||||
if (existingFileOrFolder.exists())
|
if (existingFileOrFolder.exists())
|
||||||
{
|
{
|
||||||
|
@ -2169,7 +2169,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
monitor.subTask(copyMessage.getLevelOneText());
|
monitor.subTask(copyMessage.getLevelOneText());
|
||||||
if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor))
|
if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor))
|
||||||
{
|
{
|
||||||
IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
|
IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor);
|
||||||
return copiedFile;
|
return copiedFile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2208,7 +2208,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
monitor.subTask(copyMessage.getLevelOneText());
|
monitor.subTask(copyMessage.getLevelOneText());
|
||||||
targetFS.upload(srcFileOrFolder.getAbsolutePath(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
|
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;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2245,8 +2245,8 @@ public class SystemViewRemoteFileAdapter
|
||||||
|
|
||||||
String newPath = newPathBuf.toString();
|
String newPath = newPathBuf.toString();
|
||||||
|
|
||||||
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor);
|
||||||
targetFS.createFolder(newTargetFolder);
|
targetFS.createFolder(newTargetFolder, monitor);
|
||||||
|
|
||||||
IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
||||||
if (children != null)
|
if (children != null)
|
||||||
|
@ -2292,7 +2292,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
|
|
||||||
IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
|
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("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'");
|
||||||
//RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'");
|
//RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'");
|
||||||
|
@ -2495,7 +2495,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
SystemEditableRemoteFile editable = (SystemEditableRemoteFile)editableObj;
|
SystemEditableRemoteFile editable = (SystemEditableRemoteFile)editableObj;
|
||||||
// there's an in-memory editable, so change the associated remote file
|
// 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);
|
editable.setRemoteFile(newRemoteFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2526,7 +2526,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
localResource = UniversalFileTransferUtility.getTempFileFor(file);
|
localResource = UniversalFileTransferUtility.getTempFileFor(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
ss.rename(file, newName);
|
ss.rename(file, newName, new NullProgressMonitor());
|
||||||
if (localResource != null && localResource.exists())
|
if (localResource != null && localResource.exists())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2902,7 +2902,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,6 +18,8 @@ package org.eclipse.rse.internal.files.ui.wizards;
|
||||||
|
|
||||||
import java.util.Vector;
|
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.jface.viewers.Viewer;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
|
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
|
||||||
|
@ -167,10 +169,11 @@ public class SystemNewFileWizard
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// ok, proceed with actual creation...
|
// ok, proceed with actual creation...
|
||||||
IRemoteFile newFile = null;
|
IRemoteFile newFile = null;
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
try {
|
try {
|
||||||
IRemoteFile newFilePath = rfss.getRemoteFileObject(absName);
|
IRemoteFile newFilePath = rfss.getRemoteFileObject(absName, monitor);
|
||||||
newFile = rfss.createFile(newFilePath);
|
newFile = rfss.createFile(newFilePath, monitor);
|
||||||
} catch (RemoteFileIOException exc ) {
|
} catch (RemoteFileIOException exc ) {
|
||||||
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
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);
|
msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName);
|
||||||
|
@ -381,7 +384,7 @@ public class SystemNewFileWizard
|
||||||
{
|
{
|
||||||
uniqueNames.add(pathName);
|
uniqueNames.add(pathName);
|
||||||
try {
|
try {
|
||||||
folder = parentSubSystem.getRemoteFileObject(pathName);
|
folder = parentSubSystem.getRemoteFileObject(pathName, new NullProgressMonitor());
|
||||||
// decided to do folder existence checking when Finish pressed
|
// decided to do folder existence checking when Finish pressed
|
||||||
//if (folder.exists())
|
//if (folder.exists())
|
||||||
v.add(folder);
|
v.add(folder);
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.wizards;
|
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.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.filters.ISystemFilter;
|
import org.eclipse.rse.core.filters.ISystemFilter;
|
||||||
import org.eclipse.rse.core.filters.ISystemFilterReference;
|
import org.eclipse.rse.core.filters.ISystemFilterReference;
|
||||||
|
@ -154,8 +156,9 @@ public class SystemNewFolderWizard
|
||||||
IRemoteFile newFolder = null;
|
IRemoteFile newFolder = null;
|
||||||
//IRemoteFile newFolderPath = null;
|
//IRemoteFile newFolderPath = null;
|
||||||
try {
|
try {
|
||||||
IRemoteFile newFolderPath = rfss.getRemoteFileObject(absName);
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
newFolder = rfss.createFolder(newFolderPath);
|
IRemoteFile newFolderPath = rfss.getRemoteFileObject(absName, monitor);
|
||||||
|
newFolder = rfss.createFolder(newFolderPath, monitor);
|
||||||
} catch (RemoteFileIOException exc ) {
|
} catch (RemoteFileIOException exc ) {
|
||||||
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
if (exc.getRemoteException() instanceof SystemMessageException)
|
if (exc.getRemoteException() instanceof SystemMessageException)
|
||||||
|
|
|
@ -23,6 +23,7 @@ import javax.xml.parsers.ParserConfigurationException;
|
||||||
import org.eclipse.core.runtime.Assert;
|
import org.eclipse.core.runtime.Assert;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
|
@ -144,7 +145,7 @@ public class RemoteFileImportDescriptionReader implements IRemoteFileImportDescr
|
||||||
if (path != null && subsystem != null) {
|
if (path != null && subsystem != null) {
|
||||||
IRemoteFile remoteFile = null;
|
IRemoteFile remoteFile = null;
|
||||||
try {
|
try {
|
||||||
remoteFile = subsystem.getRemoteFileObject(path);
|
remoteFile = subsystem.getRemoteFileObject(path, new NullProgressMonitor());
|
||||||
if (remoteFile != null && remoteFile.exists()) {
|
if (remoteFile != null && remoteFile.exists()) {
|
||||||
UniFilePlus file = new UniFilePlus(remoteFile);
|
UniFilePlus file = new UniFilePlus(remoteFile);
|
||||||
selectedElements.add(file);
|
selectedElements.add(file);
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class UniFilePlus extends File {
|
||||||
public boolean createNewFile() throws IOException {
|
public boolean createNewFile() throws IOException {
|
||||||
IRemoteFile newFile = null;
|
IRemoteFile newFile = null;
|
||||||
try {
|
try {
|
||||||
newFile = remoteFile.getParentRemoteFileSubSystem().createFile(remoteFile);
|
newFile = remoteFile.getParentRemoteFileSubSystem().createFile(remoteFile, new NullProgressMonitor());
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
|
@ -88,7 +88,7 @@ public class UniFilePlus extends File {
|
||||||
public boolean delete() {
|
public boolean delete() {
|
||||||
boolean ok = true;
|
boolean ok = true;
|
||||||
try {
|
try {
|
||||||
ok = remoteFile.getParentRemoteFileSubSystem().delete(remoteFile, null);
|
ok = remoteFile.getParentRemoteFileSubSystem().delete(remoteFile, new NullProgressMonitor());
|
||||||
//hmm, should we set remoteFile to null?
|
//hmm, should we set remoteFile to null?
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
|
@ -280,7 +280,7 @@ public class UniFilePlus extends File {
|
||||||
public boolean mkdir() {
|
public boolean mkdir() {
|
||||||
IRemoteFile dir = null;
|
IRemoteFile dir = null;
|
||||||
try {
|
try {
|
||||||
if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile);
|
if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile, new NullProgressMonitor());
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
||||||
|
@ -293,7 +293,7 @@ public class UniFilePlus extends File {
|
||||||
public boolean mkdirs() {
|
public boolean mkdirs() {
|
||||||
IRemoteFile dir = null;
|
IRemoteFile dir = null;
|
||||||
try {
|
try {
|
||||||
if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile);
|
if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile, new NullProgressMonitor());
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
||||||
|
@ -306,7 +306,7 @@ public class UniFilePlus extends File {
|
||||||
public boolean renameTo(File dest) {
|
public boolean renameTo(File dest) {
|
||||||
boolean ok = false;
|
boolean ok = false;
|
||||||
try {
|
try {
|
||||||
ok = remoteFile.getParentRemoteFileSubSystem().rename(remoteFile, dest.getName());
|
ok = remoteFile.getParentRemoteFileSubSystem().rename(remoteFile, dest.getName(), new NullProgressMonitor());
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.rse.internal.importexport.files;
|
package org.eclipse.rse.internal.importexport.files;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
|
import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
|
||||||
|
@ -50,7 +51,7 @@ public class Utilities {
|
||||||
path = path.replace('/', sep);
|
path = path.replace('/', sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ss.getRemoteFileObject(path);
|
ret = ss.getRemoteFileObject(path, new NullProgressMonitor());
|
||||||
} catch (SystemMessageException e) {
|
} catch (SystemMessageException e) {
|
||||||
// get RemoteFileObject has been changed to raise
|
// get RemoteFileObject has been changed to raise
|
||||||
// SystemMessageException.
|
// SystemMessageException.
|
||||||
|
|
|
@ -21,6 +21,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
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.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
import org.eclipse.jface.text.ITextViewer;
|
import org.eclipse.jface.text.ITextViewer;
|
||||||
|
@ -368,7 +370,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
contextDirectory = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost()).getRemoteFileObject(contextPath);
|
contextDirectory = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost()).getRemoteFileObject(contextPath, new NullProgressMonitor());
|
||||||
_lastFolderContext = contextDirectory;
|
_lastFolderContext = contextDirectory;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -497,7 +499,8 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
IRemoteFileSubSystem fs = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost());
|
IRemoteFileSubSystem fs = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile parent = fs.getRemoteFileObject(parentPath);
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
|
IRemoteFile parent = fs.getRemoteFileObject(parentPath, monitor);
|
||||||
|
|
||||||
Object[] fileList = null;
|
Object[] fileList = null;
|
||||||
|
|
||||||
|
@ -507,7 +510,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", null); //$NON-NLS-1$
|
fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", monitor); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package org.eclipse.rse.internal.subsystems.files.core.model;
|
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.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.core.model.ISystemProfile;
|
import org.eclipse.rse.core.model.ISystemProfile;
|
||||||
|
@ -248,7 +249,7 @@ public class RemotePath implements IRemotePath {
|
||||||
IRemoteFile remoteFile = null;
|
IRemoteFile remoteFile = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
remoteFile = subsys.getRemoteFileObject(absolutePath);
|
remoteFile = subsys.getRemoteFileObject(absolutePath, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e) {
|
catch (SystemMessageException e) {
|
||||||
SystemBasePlugin.logError("Error occured trying to get remote file", e); //$NON-NLS-1$
|
SystemBasePlugin.logError("Error occured trying to get remote file", e); //$NON-NLS-1$
|
||||||
|
|
|
@ -134,7 +134,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
* @return an IRemoteFile object for the file.
|
* @return an IRemoteFile object for the file.
|
||||||
* @see IRemoteFile
|
* @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;
|
String fullPath = parent.getAbsolutePath() + getSeparator() + folderOrFileName;
|
||||||
IRemoteFile file = getCachedRemoteFile(fullPath);
|
IRemoteFile file = getCachedRemoteFile(fullPath);
|
||||||
|
@ -143,7 +143,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
IHostFile node = getFile(null, parent.getAbsolutePath(), folderOrFileName);
|
IHostFile node = getFile(monitor, parent.getAbsolutePath(), folderOrFileName);
|
||||||
return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node);
|
return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
* @return The constructed IRemoteFile
|
* @return The constructed IRemoteFile
|
||||||
* @see IRemoteFile
|
* @see IRemoteFile
|
||||||
*/
|
*/
|
||||||
public IRemoteFile getRemoteFileObject(String folderOrFileName) throws SystemMessageException
|
public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String fofName = folderOrFileName;
|
String fofName = folderOrFileName;
|
||||||
if (folderOrFileName.length() > 1)
|
if (folderOrFileName.length() > 1)
|
||||||
|
@ -222,7 +222,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$
|
if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$
|
||||||
String name = fofName.substring(lastSep + 1, fofName.length());
|
String name = fofName.substring(lastSep + 1, fofName.length());
|
||||||
|
|
||||||
IHostFile node = getFile(new NullProgressMonitor(), parentPath, name);
|
IHostFile node = getFile(monitor, parentPath, name);
|
||||||
if (node != null)
|
if (node != null)
|
||||||
{
|
{
|
||||||
IRemoteFile parent = null;
|
IRemoteFile parent = null;
|
||||||
|
@ -595,11 +595,11 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IRemoteFile getParentFolder(IRemoteFile folderOrFile)
|
public IRemoteFile getParentFolder(IRemoteFile folderOrFile, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return getRemoteFileObject(folderOrFile.getParentPath());
|
return getRemoteFileObject(folderOrFile.getParentPath(), monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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();
|
IFileService service = getFileService();
|
||||||
String parent = fileToCreate.getParentPath();
|
String parent = fileToCreate.getParentPath();
|
||||||
|
@ -629,7 +629,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), fileToCreate.getParentRemoteFile(), newFile);
|
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();
|
IFileService service = getFileService();
|
||||||
String parent = folderToCreate.getParentPath();
|
String parent = folderToCreate.getParentPath();
|
||||||
|
@ -648,9 +648,9 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), folderToCreate.getParentRemoteFile(), newFolder);
|
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
|
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;
|
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;
|
boolean result = false;
|
||||||
removeCachedRemoteFile(folderOrFile);
|
removeCachedRemoteFile(folderOrFile);
|
||||||
|
|
|
@ -206,8 +206,11 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
||||||
/**
|
/**
|
||||||
* Given a folder or file, return its parent folder object.
|
* Given a folder or file, return its parent folder object.
|
||||||
* @param folderOrFile folder or file to return parent of.
|
* @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
|
* 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.
|
* 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 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
|
* 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.
|
* if the file with the given key is not found in the internal cache.
|
||||||
* </p>
|
* </p>
|
||||||
* @param folderOrFileName Fully qualified folder or file name.
|
* @param folderOrFileName Fully qualified folder or file name.
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return the requested IRemoteFile object.
|
* @return the requested IRemoteFile object.
|
||||||
* @throws SystemMessageException in case an error occurs contacting the
|
* @throws SystemMessageException in case an error occurs contacting the
|
||||||
* remote system while retrieving the requested remote object.
|
* 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,
|
* Given a un-qualified file or folder name, and its parent folder object,
|
||||||
* return an IRemoteFile object for the file.
|
* return an IRemoteFile object for the file.
|
||||||
* @param parent Folder containing the folder or file
|
* @param parent Folder containing the folder or file
|
||||||
* @param folderOrFileName Un-qualified folder or file name
|
* @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 <
|
* Given a key, returns a search result object for it. For the key, see <
|
||||||
|
@ -280,12 +290,12 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
||||||
* <li>If the given object is a folder, not a file, this is a no-op.
|
* <li>If the given object is a folder, not a file, this is a no-op.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @see #createFolders(IRemoteFile)
|
* @see #createFolders(IRemoteFile,IProgressMonitor)
|
||||||
*
|
*
|
||||||
* @param fileToCreate The object representing the file to be created.
|
* @param fileToCreate The object representing the file to be created.
|
||||||
* @return The same input object returned for convenience. Will throw exception if it fails.
|
* @return The same input object returned for convenience. Will throw exception if it fails.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile createFile(IRemoteFile fileToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
|
public IRemoteFile createFile(IRemoteFile fileToCreate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new folder, given its IRemoteFile object (these do not have to represent existing folders)
|
* Create a new folder, given its IRemoteFile object (these do not have to represent existing folders)
|
||||||
|
@ -296,12 +306,13 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
||||||
* <li>If the given object is a file, not a folder, this is a no-op.
|
* <li>If the given object is a file, not a folder, this is a no-op.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @see #createFolders(IRemoteFile)
|
* @see #createFolders(IRemoteFile, IProgressMonitor)
|
||||||
*
|
*
|
||||||
* @param folderToCreate The object representing the folder to be created.
|
* @param folderToCreate The object representing the folder to be created.
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return The same input object returned for convenience. Will throw exception if it fails.
|
* @return The same input object returned for convenience. Will throw exception if it fails.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile createFolder(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
|
public IRemoteFile createFolder(IRemoteFile folderToCreate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an IRemoteFile for a folder, this will create that folder and any missing parent folders in its path.
|
* Given an IRemoteFile for a folder, this will create that folder and any missing parent folders in its path.
|
||||||
|
@ -312,12 +323,13 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
||||||
* <li>If the given object is a file, not a folder, this is a no-op.
|
* <li>If the given object is a file, not a folder, this is a no-op.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @see #getParentFolder(IRemoteFile)
|
* @see #getParentFolder(IRemoteFile, IProgressMonitor)
|
||||||
*
|
*
|
||||||
* @param folderToCreate The object representing the folder to be created, along with its parents.
|
* @param folderToCreate The object representing the folder to be created, along with its parents.
|
||||||
|
* @param monitor the progress monitr
|
||||||
* @return The same input object returned for convenience. Will throw exception if it fails.
|
* @return The same input object returned for convenience. Will throw exception if it fails.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
|
public IRemoteFile createFolders(IRemoteFile folderToCreate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -351,9 +363,10 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
||||||
* Rename the given remote file or folder. This renames it in memory and, iff it exists, on disk.
|
* Rename the given remote file or folder. This renames it in memory and, iff it exists, on disk.
|
||||||
* @param folderOrFile represents the object to be renamed.
|
* @param folderOrFile represents the object to be renamed.
|
||||||
* @param newName new name to give it.
|
* @param newName new name to give it.
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return false if the given folder/file didn't exist on disk (still renamed in memory), else true. Throws an exception if anything fails.
|
* @return false if the given folder/file didn't exist on disk (still renamed in memory), else true. Throws an exception if anything fails.
|
||||||
*/
|
*/
|
||||||
public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileSecurityException, RemoteFileIOException;
|
public boolean rename(IRemoteFile folderOrFile, String newName, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,6 +27,8 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||||
import org.eclipse.core.runtime.jobs.MultiRule;
|
import org.eclipse.core.runtime.jobs.MultiRule;
|
||||||
|
@ -182,21 +184,22 @@ public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
|
||||||
IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
|
IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
|
||||||
if (ss != null)
|
if (ss != null)
|
||||||
{
|
{
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
try {
|
try {
|
||||||
char sep = getSeparatorChar();
|
char sep = getSeparatorChar();
|
||||||
if (pathOnly.length() == 0)
|
if (pathOnly.length() == 0)
|
||||||
parentFile = ss.getRemoteFileObject(pathOnly);
|
parentFile = ss.getRemoteFileObject(pathOnly, monitor);
|
||||||
else if (pathOnly.length() == 1)
|
else if (pathOnly.length() == 1)
|
||||||
{
|
{
|
||||||
if (pathOnly.charAt(0) == sep)
|
if (pathOnly.charAt(0) == sep)
|
||||||
{
|
{
|
||||||
parentFile = ss.getRemoteFileObject(pathOnly); // root file
|
parentFile = ss.getRemoteFileObject(pathOnly, monitor); // root file
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(pathOnly.charAt(pathOnly.length()-1)==sep))
|
else if (!(pathOnly.charAt(pathOnly.length()-1)==sep))
|
||||||
parentFile = ss.getRemoteFileObject(pathOnly+sep);
|
parentFile = ss.getRemoteFileObject(pathOnly+sep, monitor);
|
||||||
else
|
else
|
||||||
parentFile = ss.getRemoteFileObject(pathOnly);
|
parentFile = ss.getRemoteFileObject(pathOnly, monitor);
|
||||||
} catch (SystemMessageException e) {
|
} catch (SystemMessageException e) {
|
||||||
SystemBasePlugin.logError("RemoteFileImpl.getParentRemoteFile()", e); //$NON-NLS-1$
|
SystemBasePlugin.logError("RemoteFileImpl.getParentRemoteFile()", e); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.OperationCanceledException;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.filters.ISystemFilter;
|
import org.eclipse.rse.core.filters.ISystemFilter;
|
||||||
|
@ -115,7 +115,6 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
// all created IRemoteFiles mapped in cache to quick retreival
|
// all created IRemoteFiles mapped in cache to quick retreival
|
||||||
protected HashMap _cachedRemoteFiles = new HashMap();
|
protected HashMap _cachedRemoteFiles = new HashMap();
|
||||||
|
|
||||||
protected IProgressMonitor monitor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @generated This field/method will be replaced during code generation.
|
* @generated This field/method will be replaced during code generation.
|
||||||
|
@ -160,17 +159,6 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Long running list processing calls this method to check for a user-cancel event.
|
|
||||||
* If user did cancel, an exception is thrown.
|
|
||||||
* @return true if caller wants to cancel
|
|
||||||
*/
|
|
||||||
public boolean checkForCancel()
|
|
||||||
{
|
|
||||||
if ((monitor != null) && monitor.isCanceled())
|
|
||||||
throw new OperationCanceledException(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED).getLevelOneText());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected RemoteFileFilterString getCurrentFilterString()
|
protected RemoteFileFilterString getCurrentFilterString()
|
||||||
{
|
{
|
||||||
|
@ -349,7 +337,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
container = getRemoteFileObject(container).getAbsolutePath();
|
container = getRemoteFileObject(container, new NullProgressMonitor()).getAbsolutePath();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -607,7 +595,6 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
*/
|
*/
|
||||||
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
|
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
|
||||||
{
|
{
|
||||||
this.monitor = monitor;
|
|
||||||
boolean debugMode = false;
|
boolean debugMode = false;
|
||||||
IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration();
|
IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration();
|
||||||
boolean windows = !rfssf.isUnixStyle();
|
boolean windows = !rfssf.isUnixStyle();
|
||||||
|
@ -643,7 +630,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
IRemoteFile parent = null;
|
IRemoteFile parent = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
parent = getRemoteFileObject(path);
|
parent = getRemoteFileObject(path, monitor);
|
||||||
|
|
||||||
/* DKM - now filters should get invalidated via SystemRegistry event firing so this should not be needed
|
/* DKM - now filters should get invalidated via SystemRegistry event firing so this should not be needed
|
||||||
*
|
*
|
||||||
|
@ -778,8 +765,6 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
*/
|
*/
|
||||||
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
|
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
|
||||||
{
|
{
|
||||||
|
|
||||||
this.monitor = monitor;
|
|
||||||
RemoteFileFilterString fs = null;
|
RemoteFileFilterString fs = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -995,7 +980,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
|
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
String remoteFilePath = key.substring(0, idx);
|
String remoteFilePath = key.substring(0, idx);
|
||||||
IRemoteFile remoteFile = getRemoteFileObject(remoteFilePath);
|
IRemoteFile remoteFile = getRemoteFileObject(remoteFilePath, new NullProgressMonitor());
|
||||||
|
|
||||||
if (remoteFile != null) {
|
if (remoteFile != null) {
|
||||||
|
|
||||||
|
@ -1039,30 +1024,19 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it.
|
* 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 folderOrFileNames Fully qualified folder or file names
|
||||||
*/
|
*/
|
||||||
public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames) throws SystemMessageException
|
public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
SystemRemoteResourceSet results = new SystemRemoteResourceSet(this);
|
SystemRemoteResourceSet results = new SystemRemoteResourceSet(this);
|
||||||
for (int i = 0; i < folderOrFileNames.size(); i++)
|
for (int i = 0; i < folderOrFileNames.size(); i++)
|
||||||
{
|
{
|
||||||
String path = (String)folderOrFileNames.get(i);
|
String path = (String)folderOrFileNames.get(i);
|
||||||
IRemoteFile nextFile = getRemoteFileObject(path);
|
IRemoteFile nextFile = getRemoteFileObject(path, monitor);
|
||||||
if (nextFile != null) results.addResource(nextFile);
|
if (nextFile != null) results.addResource(nextFile);
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Given a un-qualified file or folder name, and its parent folder object,
|
|
||||||
* return an IRemoteFile object for the file.
|
|
||||||
* <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
|
|
||||||
* @param parent Folder containing the folder or file
|
|
||||||
* @param folderOrFileName Un-qualified folder or file name
|
|
||||||
*/
|
|
||||||
public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException
|
|
||||||
{
|
|
||||||
// child subclasses must override
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the object within the subsystem that corresponds to
|
* Return the object within the subsystem that corresponds to
|
||||||
|
@ -1096,7 +1070,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
// if not, the key must be for a file
|
// if not, the key must be for a file
|
||||||
if (key.lastIndexOf(IHostSearchResult.SEARCH_RESULT_DELIMITER) < 0) {
|
if (key.lastIndexOf(IHostSearchResult.SEARCH_RESULT_DELIMITER) < 0) {
|
||||||
|
|
||||||
IRemoteFile remoteFile = getRemoteFileObject(key);
|
IRemoteFile remoteFile = getRemoteFileObject(key, new NullProgressMonitor());
|
||||||
|
|
||||||
if (remoteFile != null) {
|
if (remoteFile != null) {
|
||||||
return remoteFile;
|
return remoteFile;
|
||||||
|
@ -1173,7 +1147,6 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
*/
|
*/
|
||||||
protected boolean accept(String name, boolean isFile)
|
protected boolean accept(String name, boolean isFile)
|
||||||
{
|
{
|
||||||
checkForCancel();
|
|
||||||
boolean match = true;
|
boolean match = true;
|
||||||
if (includeFilesOrFolders == IClientServerConstants.INCLUDE_FILES_ONLY)
|
if (includeFilesOrFolders == IClientServerConstants.INCLUDE_FILES_ONLY)
|
||||||
{
|
{
|
||||||
|
@ -1492,7 +1465,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// change target to be referenced remote folder
|
// change target to be referenced remote folder
|
||||||
return getRemoteFileObject(fs.getPath());
|
return getRemoteFileObject(fs.getPath(), new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -343,7 +343,8 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
|
||||||
ArrayList addedFolders = new ArrayList();
|
ArrayList addedFolders = new ArrayList();
|
||||||
|
|
||||||
char separator = isWindows() ? ';' : ':';
|
char separator = isWindows() ? ';' : ':';
|
||||||
StringTokenizer tokenizer = new StringTokenizer(path, separator + ""); //$NON-NLS-1$
|
StringTokenizer tokenizer = new StringTokenizer(path, separator + ""); //$NON-NLS-1$\
|
||||||
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
while (tokenizer.hasMoreTokens())
|
while (tokenizer.hasMoreTokens())
|
||||||
{
|
{
|
||||||
String token = tokenizer.nextToken();
|
String token = tokenizer.nextToken();
|
||||||
|
@ -355,7 +356,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
|
||||||
IRemoteFileSubSystem fs = getFileSubSystem();
|
IRemoteFileSubSystem fs = getFileSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile file = fs.getRemoteFileObject(token);
|
IRemoteFile file = fs.getRemoteFileObject(token, monitor);
|
||||||
addedFolders.add(file);
|
addedFolders.add(file);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.eclipse.rse.internal.subsystems.shells.dstore;
|
package org.eclipse.rse.internal.subsystems.shells.dstore;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.dstore.core.model.DataElement;
|
import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.rse.internal.services.dstore.shells.DStoreHostOutput;
|
import org.eclipse.rse.internal.services.dstore.shells.DStoreHostOutput;
|
||||||
import org.eclipse.rse.internal.services.dstore.shells.DStoreHostShell;
|
import org.eclipse.rse.internal.services.dstore.shells.DStoreHostShell;
|
||||||
|
@ -51,7 +52,7 @@ public class DStoreServiceCommandShell extends ServiceCommandShell
|
||||||
IRemoteFileSubSystem ss = getFileSubSystem();
|
IRemoteFileSubSystem ss = getFileSubSystem();
|
||||||
if (ss.isConnected())
|
if (ss.isConnected())
|
||||||
{
|
{
|
||||||
return ss.getRemoteFileObject(workingDir);
|
return ss.getRemoteFileObject(workingDir, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.eclipse.rse.internal.subsystems.shells.local.model;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
|
import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
|
||||||
import org.eclipse.rse.services.shells.IHostOutput;
|
import org.eclipse.rse.services.shells.IHostOutput;
|
||||||
|
@ -62,7 +63,7 @@ public class LocalServiceCommandShell extends ServiceCommandShell
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _fs.getRemoteFileObject(workingDir);
|
return _fs.getRemoteFileObject(workingDir, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
|
@ -68,7 +69,7 @@ public class SshServiceCommandShell extends ServiceCommandShell
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _fs.getRemoteFileObject(workingDir);
|
return _fs.getRemoteFileObject(workingDir, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue