mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 10:25:32 +02:00
fixes for 154302 - relaying exceptions back from fetch operations
This commit is contained in:
parent
e3e179d5a2
commit
400065dc6a
11 changed files with 120 additions and 42 deletions
|
@ -17,6 +17,7 @@
|
||||||
package samples.ui.propertypages;
|
package samples.ui.propertypages;
|
||||||
|
|
||||||
import org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction;
|
import org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction;
|
||||||
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
|
@ -196,6 +197,8 @@ public class FolderInfoPropertyPage
|
||||||
*/
|
*/
|
||||||
private void walkFolder(IRemoteFile currFolder)
|
private void walkFolder(IRemoteFile currFolder)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(currFolder);
|
IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(currFolder);
|
||||||
if ((folders != null) && (folders.length>0))
|
if ((folders != null) && (folders.length>0))
|
||||||
{
|
{
|
||||||
|
@ -216,6 +219,11 @@ public class FolderInfoPropertyPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
} // end of walkFolder method
|
} // end of walkFolder method
|
||||||
|
|
||||||
} // end of inner class
|
} // end of inner class
|
||||||
|
|
|
@ -49,6 +49,7 @@ import org.eclipse.osgi.util.NLS;
|
||||||
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
|
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
|
||||||
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
|
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
|
||||||
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
|
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
|
||||||
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
|
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
|
||||||
|
@ -92,12 +93,19 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IRemoteFile[] children = _subSystem.listFoldersAndFiles(_remoteFile);
|
try
|
||||||
names = new String[children.length];
|
|
||||||
for (int i = 0; i < children.length; i++)
|
|
||||||
{
|
{
|
||||||
names[i] = ((IRemoteFile)children[i]).getName();
|
IRemoteFile[] children = _subSystem.listFoldersAndFiles(_remoteFile);
|
||||||
}
|
names = new String[children.length];
|
||||||
|
for (int i = 0; i < children.length; i++)
|
||||||
|
{
|
||||||
|
names[i] = ((IRemoteFile)children[i]).getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
names = new String[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
prefStore.setValue(ISystemPreferencesConstants.SHOWHIDDEN, false);
|
prefStore.setValue(ISystemPreferencesConstants.SHOWHIDDEN, false);
|
||||||
return names;
|
return names;
|
||||||
|
|
|
@ -141,6 +141,8 @@ public class SystemExtractAction extends SystemBaseAction
|
||||||
|
|
||||||
public void run(IProgressMonitor monitor)
|
public void run(IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection);
|
IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection);
|
||||||
for (int j = 0; j < sources.length && !monitor.isCanceled(); j++)
|
for (int j = 0; j < sources.length && !monitor.isCanceled(); j++)
|
||||||
{
|
{
|
||||||
|
@ -168,6 +170,12 @@ public class SystemExtractAction extends SystemBaseAction
|
||||||
System.out.println("Could not extract " + sources[j].getAbsolutePath());
|
System.out.println("Could not extract " + sources[j].getAbsolutePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
|
||||||
|
dlg.open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,16 +304,23 @@ public class UniversalFileTransferUtility
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tempFolder = getTempFileFor(srcFileOrFolder);
|
tempFolder = getTempFileFor(srcFileOrFolder);
|
||||||
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
try
|
||||||
|
|
||||||
|
|
||||||
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
|
|
||||||
SystemWorkspaceResourceSet childResults = copyRemoteResourcesToWorkspace(childSet, monitor);
|
|
||||||
if (childResults.hasMessage())
|
|
||||||
{
|
{
|
||||||
resultSet.setMessage(childResults.getMessage());
|
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
||||||
|
|
||||||
|
|
||||||
|
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
|
||||||
|
SystemWorkspaceResourceSet childResults = copyRemoteResourcesToWorkspace(childSet, monitor);
|
||||||
|
if (childResults.hasMessage())
|
||||||
|
{
|
||||||
|
resultSet.setMessage(childResults.getMessage());
|
||||||
|
}
|
||||||
|
resultSet.addResource(tempFolder);
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
resultSet.addResource(tempFolder);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -461,7 +468,15 @@ public class UniversalFileTransferUtility
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tempFolder = getTempFileFor(srcFileOrFolder);
|
tempFolder = getTempFileFor(srcFileOrFolder);
|
||||||
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
IRemoteFile[] children = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
IResource[] childResources = new IResource[children.length];
|
IResource[] childResources = new IResource[children.length];
|
||||||
|
|
||||||
if (children != null)
|
if (children != null)
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.eclipse.jface.text.contentassist.IContextInformation;
|
||||||
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
|
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
|
||||||
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
|
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
|
||||||
import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem;
|
import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem;
|
||||||
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
|
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||||
|
@ -562,7 +563,13 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, currentText + "*");
|
try
|
||||||
|
{
|
||||||
|
fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, currentText + "*");
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//_provider.getChildren(workingDirectory);
|
//_provider.getChildren(workingDirectory);
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAda
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
|
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
|
||||||
|
import org.eclipse.rse.ui.ISystemMessages;
|
||||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
import org.eclipse.rse.ui.messages.SystemMessageDialog;
|
import org.eclipse.rse.ui.messages.SystemMessageDialog;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
@ -321,7 +322,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
||||||
* @param context The holder of state information
|
* @param context The holder of state information
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context)
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String parentPath = null;
|
String parentPath = null;
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -329,15 +330,15 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
} else {
|
} else {
|
||||||
parentPath = "/";
|
parentPath = "/";
|
||||||
}
|
}
|
||||||
IHostFile[] results = null;
|
|
||||||
try
|
if (!parent.canRead())
|
||||||
{
|
{
|
||||||
results = getFilesAndFolders(null, parentPath, fileNameFilter);
|
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
|
||||||
}
|
throw new SystemMessageException(msg);
|
||||||
catch (SystemMessageException e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IHostFile[] results = getFilesAndFolders(null, parentPath, fileNameFilter);
|
||||||
|
|
||||||
IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
|
IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
|
||||||
parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
|
parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
|
||||||
return farr;
|
return farr;
|
||||||
|
|
|
@ -108,38 +108,38 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
* Return a list of roots/drives on the remote system.
|
* Return a list of roots/drives on the remote system.
|
||||||
* This version is called directly by users.
|
* This version is called directly by users.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listRoots() throws InterruptedException;
|
public IRemoteFile[] listRoots() throws InterruptedException, SystemMessageException;
|
||||||
/**
|
/**
|
||||||
* Return a list of all remote folders in the given parent folder on the remote system
|
* Return a list of all remote folders in the given parent folder on the remote system
|
||||||
* @param parent The parent folder to list folders in
|
* @param parent The parent folder to list folders in
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFolders(IRemoteFile parent);
|
public IRemoteFile[] listFolders(IRemoteFile parent) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a full list of remote folders in the given parent folder on the remote system.
|
* Return a full list of remote folders in the given parent folder on the remote system.
|
||||||
* @param parent The parent folder to list folders in
|
* @param parent The parent folder to list folders in
|
||||||
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter);
|
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of all remote files in the given parent folder on the remote system
|
* Return a list of all remote files in the given parent folder on the remote system
|
||||||
* @param parent The parent folder to list files in
|
* @param parent The parent folder to list files in
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFiles(IRemoteFile parent);
|
public IRemoteFile[] listFiles(IRemoteFile parent) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of remote files in the given folder, which match the given name pattern.
|
* Return a list of remote files in the given folder, which match the given name pattern.
|
||||||
* @param parent The parent folder to list files in
|
* @param parent The parent folder to list files in
|
||||||
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter);
|
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
||||||
* @param parent The parent folder to list folders and files in
|
* @param parent The parent folder to list folders and files in
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent);
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of remote folders and files in the given folder. Only file names are subsettable
|
* Return a list of remote folders and files in the given folder. Only file names are subsettable
|
||||||
|
@ -147,7 +147,7 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
* @param parent The parent folder to list folders and files in
|
* @param parent The parent folder to list folders and files in
|
||||||
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter);
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of remote folders and files in the given folder.
|
* Return a list of remote folders and files in the given folder.
|
||||||
|
@ -159,7 +159,7 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
||||||
* @param context The holder of state information
|
* @param context The holder of state information
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context);
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a subsetted list of remote folders in the given parent folder on the remote system.
|
* Return a subsetted list of remote folders in the given parent folder on the remote system.
|
||||||
|
@ -169,7 +169,7 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
||||||
* @param context The holder of state information
|
* @param context The holder of state information
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context);
|
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of remote files in the given folder, which match the given name pattern.
|
* Return a list of remote files in the given folder, which match the given name pattern.
|
||||||
|
@ -179,7 +179,7 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
||||||
* @param context The holder of state information
|
* @param context The holder of state information
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context);
|
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException;
|
||||||
/**
|
/**
|
||||||
* Given a search configuration, searches for its results.
|
* Given a search configuration, searches for its results.
|
||||||
* @param searchConfig a search configuration.
|
* @param searchConfig a search configuration.
|
||||||
|
|
|
@ -608,7 +608,8 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] children = null;
|
Object[] children = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
// if parent exists, get its children according to the filter
|
// if parent exists, get its children according to the filter
|
||||||
if (parent != null && parentExists)
|
if (parent != null && parentExists)
|
||||||
{
|
{
|
||||||
|
@ -668,6 +669,12 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
msg.makeSubstitution(parent.getAbsolutePath());
|
msg.makeSubstitution(parent.getAbsolutePath());
|
||||||
children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, null);
|
children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
children = new SystemMessageObject[1];
|
||||||
|
children[0] = new SystemMessageObject(e.getSystemMessage(), ISystemMessageObject.MSGTYPE_ERROR, null);
|
||||||
|
}
|
||||||
|
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
|
@ -717,6 +724,8 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
|
|
||||||
this.monitor = monitor;
|
this.monitor = monitor;
|
||||||
RemoteFileFilterString fs = null;
|
RemoteFileFilterString fs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
//System.out.println("Inside internalResolveFilterString for parent '"+parent+"' for filterstring '" + filterString+"'");
|
//System.out.println("Inside internalResolveFilterString for parent '"+parent+"' for filterstring '" + filterString+"'");
|
||||||
if (filterString == null) // this will be the case when we want to support merging of filter strings
|
if (filterString == null) // this will be the case when we want to support merging of filter strings
|
||||||
{
|
{
|
||||||
|
@ -774,13 +783,20 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return new Object[] {
|
return new Object[] {
|
||||||
};
|
};}
|
||||||
|
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
SystemMessageObject[] children = new SystemMessageObject[1];
|
||||||
|
children[0] = new SystemMessageObject(e.getSystemMessage(), ISystemMessageObject.MSGTYPE_ERROR, null);
|
||||||
|
return children;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Do one filter string relative resolve
|
* Do one filter string relative resolve
|
||||||
*/
|
*/
|
||||||
protected Object[] internalResolveOneFilterString(IProgressMonitor monitor, Object parent, RemoteFileFilterString fs, boolean sort)
|
protected Object[] internalResolveOneFilterString(IProgressMonitor monitor, Object parent, RemoteFileFilterString fs, boolean sort)
|
||||||
throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
|
throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
|
||||||
{
|
{
|
||||||
currFilterString = fs;
|
currFilterString = fs;
|
||||||
String filterString = fs.toStringNoSwitches();
|
String filterString = fs.toStringNoSwitches();
|
||||||
|
@ -826,7 +842,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* Return a list of all remote folders in the given parent folder on the remote system
|
* Return a list of all remote folders in the given parent folder on the remote system
|
||||||
* @param parent The parent folder to list folders in
|
* @param parent The parent folder to list folders in
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFolders(IRemoteFile parent)
|
public IRemoteFile[] listFolders(IRemoteFile parent) throws SystemMessageException
|
||||||
{
|
{
|
||||||
return listFolders(parent, null);
|
return listFolders(parent, null);
|
||||||
}
|
}
|
||||||
|
@ -836,7 +852,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* @param parent The parent folder to list folders in
|
* @param parent The parent folder to list folders in
|
||||||
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter)
|
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter) throws SystemMessageException
|
||||||
{
|
{
|
||||||
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
||||||
filterString.setPath(parent.getAbsolutePath());
|
filterString.setPath(parent.getAbsolutePath());
|
||||||
|
@ -853,7 +869,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* Return a list of all remote files in the given parent folder on the remote system
|
* Return a list of all remote files in the given parent folder on the remote system
|
||||||
* @param parent The parent folder to list files in
|
* @param parent The parent folder to list files in
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFiles(IRemoteFile parent)
|
public IRemoteFile[] listFiles(IRemoteFile parent) throws SystemMessageException
|
||||||
{
|
{
|
||||||
return listFiles(parent, null);
|
return listFiles(parent, null);
|
||||||
}
|
}
|
||||||
|
@ -863,7 +879,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* @param parent The parent folder to list files in
|
* @param parent The parent folder to list files in
|
||||||
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter)
|
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException
|
||||||
{
|
{
|
||||||
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
||||||
filterString.setPath(parent.getAbsolutePath());
|
filterString.setPath(parent.getAbsolutePath());
|
||||||
|
@ -879,7 +895,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
||||||
* @param parent The parent folder to list folders and files in
|
* @param parent The parent folder to list folders and files in
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent)
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent) throws SystemMessageException
|
||||||
{
|
{
|
||||||
return listFoldersAndFiles(parent, (String) null);
|
return listFoldersAndFiles(parent, (String) null);
|
||||||
}
|
}
|
||||||
|
@ -892,7 +908,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
* @param parent The parent folder to list folders and files in
|
* @param parent The parent folder to list folders and files in
|
||||||
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
||||||
*/
|
*/
|
||||||
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter)
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.eclipse.rse.subsystems.files.core.util;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||||
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
import org.eclipse.rse.ui.ISystemMessages;
|
import org.eclipse.rse.ui.ISystemMessages;
|
||||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
|
@ -78,6 +79,8 @@ public class ValidatorFileUniqueName
|
||||||
isFolder ? RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID) :
|
isFolder ? RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID) :
|
||||||
RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID)
|
RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID)
|
||||||
);
|
);
|
||||||
|
try
|
||||||
|
{
|
||||||
IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder);
|
IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder);
|
||||||
if (contents!=null)
|
if (contents!=null)
|
||||||
{
|
{
|
||||||
|
@ -86,6 +89,10 @@ public class ValidatorFileUniqueName
|
||||||
names[idx] = contents[idx].getName();
|
names[idx] = contents[idx].getName();
|
||||||
setExistingNamesList(names);
|
setExistingNamesList(names);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (SystemMessageException e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//shell.setCursor(null);
|
//shell.setCursor(null);
|
||||||
org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(shell, null);
|
org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(shell, null);
|
||||||
|
|
|
@ -425,6 +425,8 @@ public interface ISystemMessages
|
||||||
public static final String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR = "RSEF5009"; //$NON-NLS-1$
|
public static final String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR = "RSEF5009"; //$NON-NLS-1$
|
||||||
public static final String MSG_UPLOAD_FILE_EXISTS = "RSEF5012"; //$NON-NLS-1$
|
public static final String MSG_UPLOAD_FILE_EXISTS = "RSEF5012"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public static final String MSG_FOLDER_UNREADABLE = "RSEF5020";
|
||||||
|
|
||||||
// General error message
|
// General error message
|
||||||
public static final String MSG_ERROR_GENERAL = "RSEO1002"; //$NON-NLS-1$
|
public static final String MSG_ERROR_GENERAL = "RSEO1002"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
|
@ -1070,6 +1070,12 @@ Contributors:
|
||||||
<LevelOne>Parent folder %1 does not exist. Verify that the correct path was entered.</LevelOne>
|
<LevelOne>Parent folder %1 does not exist. Verify that the correct path was entered.</LevelOne>
|
||||||
<LevelTwo></LevelTwo>
|
<LevelTwo></LevelTwo>
|
||||||
</Message>
|
</Message>
|
||||||
|
|
||||||
|
|
||||||
|
<Message ID="5020" Indicator="I">
|
||||||
|
<LevelOne>Folder %1 is not readable. Cannot expand</LevelOne>
|
||||||
|
<LevelTwo></LevelTwo>
|
||||||
|
</Message>
|
||||||
|
|
||||||
<!-- Import/Export messages -->
|
<!-- Import/Export messages -->
|
||||||
<Message ID="5101" Indicator="E">
|
<Message ID="5101" Indicator="E">
|
||||||
|
|
Loading…
Add table
Reference in a new issue