1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

Bug 160777 - use progress monitor for queries

This commit is contained in:
David McKnight 2006-10-20 20:24:48 +00:00
parent 47bc4d7548
commit 38db57e05c
29 changed files with 179 additions and 164 deletions

View file

@ -199,7 +199,7 @@ public class FolderInfoPropertyPage
{
try
{
IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(currFolder);
IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles( currFolder, null);
if ((folders != null) && (folders.length>0))
{
for (int idx=0; !stopped && (idx<folders.length); idx++)

View file

@ -257,7 +257,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
targetFS.createFolder(newTargetFolder);
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
if (children != null)
{
for (int i = 0; i < children.length; i++)

View file

@ -144,7 +144,7 @@ public class SystemExtractAction extends SystemBaseAction
{
try
{
IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection);
IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection, monitor);
for (int j = 0; j < sources.length && !monitor.isCanceled(); j++)
{
try

View file

@ -346,7 +346,7 @@ public class UniversalFileTransferUtility
tempFolder = getTempFileFor(srcFileOrFolder);
try
{
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder,monitor);
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
@ -766,7 +766,7 @@ public class UniversalFileTransferUtility
IRemoteFile[] children = null;
try
{
children = srcFS.listFoldersAndFiles(srcFileOrFolder);
children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
}
catch (SystemMessageException e)
{
@ -1532,7 +1532,7 @@ public class UniversalFileTransferUtility
if (!shouldExtract)
{
// check for empty dir
IRemoteFile[] children = localSS.listFiles(currentSource);
IRemoteFile[] children = localSS.listFiles(currentSource, monitor);
if (children == null || children.length == 0)
{

View file

@ -2136,7 +2136,7 @@ public class SystemViewRemoteFileAdapter
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
targetFS.createFolder(newTargetFolder);
IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder);
IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder, monitor);
if (children != null)
{
for (int i = 0; i < children.length; i++)

View file

@ -343,7 +343,7 @@ public class SystemNewFileWizard
if (rffs.listRoots())
{
try {
IRemoteFile[] roots = parentSubSystem.listRoots();
IRemoteFile[] roots = parentSubSystem.listRoots(null);
for (int rootIdx = 0; (roots!=null) && (rootIdx<roots.length); rootIdx++)
{
if (uniqueNames.indexOf(roots[idx].getName())==-1)

View file

@ -40,7 +40,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
@ -211,7 +211,7 @@ public class SystemKillProcessAction extends SystemBaseDialogAction implements I
throws Exception
{
RemoteProcessSubSystem ss;
IRemoteProcessSubSystem ss;
boolean ok = false;
ss = process.getParentRemoteProcessSubSystem();

View file

@ -25,7 +25,7 @@ import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.processes.ui.SystemProcessesResources;
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
@ -51,12 +51,12 @@ public class RemoteProcessesDialog extends SystemPromptDialog implements KeyList
{
private Text _nameFilterText;
private SystemTableView _viewer;
private RemoteProcessSubSystem _subSystem;
private IRemoteProcessSubSystem _subSystem;
private String _executableFilter;
private Table _table;
private IHostProcess _selected;
public RemoteProcessesDialog(Shell shell, String title, RemoteProcessSubSystem subSystem, String executableFilter)
public RemoteProcessesDialog(Shell shell, String title, IRemoteProcessSubSystem subSystem, String executableFilter)
{
super(shell, title);
_subSystem = subSystem;

View file

@ -32,7 +32,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteTypes;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
@ -159,14 +159,14 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
public Object[] getChildren(Object element)
{
IRemoteProcess process = (IRemoteProcess) element;
RemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
IRemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
IHostProcessFilter orgRpfs = process.getFilterString();
Object[] children = null;
try
{
children = ss.listAllProcesses(orgRpfs, process.getContext());
children = ss.listAllProcesses(orgRpfs, process.getContext(), null);
if ((children == null) || (children.length == 0))
{
children = EMPTY_LIST;

View file

@ -638,6 +638,11 @@ public class LocalFileService extends AbstractFileService implements IFileServic
}
else
{
// allow cancel before doing the os query
if (monitor != null && monitor.isCanceled())
{
return null;
}
if (!fFilter.isGeneric())
{
File file = new File(localParent, fileFilter);

View file

@ -506,7 +506,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
}
else
{
fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*");
fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", null);
}
@ -562,7 +562,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
{
try
{
fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, currentText + "*");
fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, currentText + "*", null);
}
catch (SystemMessageException e)
{

View file

@ -183,7 +183,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
{
try
{
return listRoots()[0];
return listRoots(null)[0];
}
catch (Exception e)
{
@ -322,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 context The holder of state information
*/
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException
{
String parentPath = null;
if (parent != null) {
@ -337,7 +337,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
throw new SystemMessageException(msg);
}
IHostFile[] results = getFilesAndFolders(null, parentPath, fileNameFilter);
IHostFile[] results = getFilesAndFolders(monitor, parentPath, fileNameFilter);
IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
@ -352,7 +352,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
* @param context The holder of state information
*/
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context,IProgressMonitor monitor) throws SystemMessageException
{
String parentPath = null;
if (parent != null) {
@ -370,7 +370,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IHostFile[] results = null;
try
{
results = getFiles(null, parentPath, fileNameFilter);
results = getFiles(monitor, parentPath, fileNameFilter);
}
catch (SystemMessageException e)
{
@ -388,7 +388,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
* @param context The holder of state information
*/
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException
{
String parentPath = null;
if (parent != null) {
@ -406,7 +406,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IHostFile[] results = null;
try
{
results = getFolders(null, parentPath, fileNameFilter);
results = getFolders(monitor, parentPath, fileNameFilter);
}
catch (SystemMessageException e)
{
@ -416,12 +416,12 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
return farr;
}
public IRemoteFile[] listRoots(IRemoteFileContext context) throws InterruptedException
public IRemoteFile[] listRoots(IRemoteFileContext context, IProgressMonitor monitor) throws InterruptedException
{
IHostFile[] roots = null;
try
{
roots = getRoots(null);
roots = getRoots(monitor);
}
catch (SystemMessageException e)
{

View file

@ -108,46 +108,52 @@ public interface IRemoteFileSubSystem extends ISubSystem{
* Return a list of roots/drives on the remote system.
* This version is called directly by users.
*/
public IRemoteFile[] listRoots() throws InterruptedException, SystemMessageException;
public IRemoteFile[] listRoots(IProgressMonitor monitor) throws InterruptedException, SystemMessageException;
/**
* 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 monitor the progress monitor
*/
public IRemoteFile[] listFolders(IRemoteFile parent) throws SystemMessageException;
public IRemoteFile[] listFolders(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
/**
* 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 fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
* @param monitor the progress monitor
*/
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter) throws SystemMessageException;
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
* 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 monitor the progress monitor
*/
public IRemoteFile[] listFiles(IRemoteFile parent) throws SystemMessageException;
public IRemoteFile[] listFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
/**
* 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 fileNameFilter The name pattern to subset the list by, or null to return all files.
* @param monitor the progress monitor
*/
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException;
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
* 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 monitor the progress monitor
*/
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent) throws SystemMessageException;
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a list of remote folders and files in the given folder. Only file names are subsettable
* by the given file name filter. It can be null for no subsetting.
* @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 monitor the progress monitor
*/
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException;
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a list of remote folders and files in the given folder.
@ -158,8 +164,9 @@ public interface IRemoteFileSubSystem extends ISubSystem{
* @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 context The holder of state information
* @param monitor the progress monitor
*/
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException;
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a subsetted list of remote folders in the given parent folder on the remote system.
@ -168,8 +175,9 @@ public interface IRemoteFileSubSystem extends ISubSystem{
* @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 context The holder of state information
* @param monitor the progress monitor
*/
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException;
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a list of remote files in the given folder, which match the given name pattern.
@ -178,8 +186,9 @@ public interface IRemoteFileSubSystem extends ISubSystem{
* @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 context The holder of state information
* @param monitor the progress monitor
*/
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException;
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException;
/**
* Given a search configuration, searches for its results.
* @param searchConfig a search configuration.
@ -285,18 +294,6 @@ public interface IRemoteFileSubSystem extends ISubSystem{
*/
public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
/**
* Delete the given remote file or folder.
* <ul>
* <li>If the input is a folder, that folder must be empty for this to succeed.
* </ul>
*
* @param folderOrFile represents the object to be deleted.
* @return false if the given folder/file didn't exist to begin with, else true. Throws an exception if anything fails.
*
* @deprecated use the delete that takes a monitor now
*/
public boolean delete(IRemoteFile folderOrFile) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException;
/**
@ -332,16 +329,6 @@ public interface IRemoteFileSubSystem extends ISubSystem{
*/
public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileSecurityException, RemoteFileIOException;
/**
* Move a file or folder to a new target parent folder.
*
* @param sourceFolderOrFile The file or folder to move
* @param targetFolder The folder to move to. No guarantee it is on the same system, so be sure to check getSystemConnection()!
* @param newName The new name for the moved file or folder
* @return false true iff the move succeeded
*/
public boolean move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName) throws RemoteFileSecurityException, RemoteFileIOException;
/**
* Move a file or folder to a new target parent folder.
@ -702,7 +689,7 @@ public interface IRemoteFileSubSystem extends ISubSystem{
* This version is called by RemoteFileSubSystemImpl's resolveFilterString(s)
* <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
*/
public IRemoteFile[] listRoots(IRemoteFileContext context) throws InterruptedException;
public IRemoteFile[] listRoots(IRemoteFileContext context, IProgressMonitor monitor) throws InterruptedException;
/**
* Returns the TCP/IP address for the local system that is accessible from

View file

@ -58,7 +58,6 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
import org.eclipse.rse.services.search.IHostSearchResult;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
@ -584,7 +583,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
if (debugMode)
SystemBasePlugin.logInfo("...LISTROOTS = " + fs.listRoots());
if (fs.listRoots())
return listRoots(new RemoteFileContext(this, null, fs));
return listRoots(new RemoteFileContext(this, null, fs), monitor);
else
{
boolean showDirs = fs.getShowSubDirs();
@ -639,17 +638,17 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
else if (hasFileContents)
{
// already have the files, now add the folders
listFolders(parent, filter);
listFolders(parent, filter, monitor);
}
else if (hasFolderContents)
{
// already have the folders, now add the files
listFiles(parent, filter);
listFiles(parent, filter, monitor);
}
else
{
// don't have anything - query both
listFoldersAndFiles(parent, filter);
listFoldersAndFiles(parent, filter, monitor);
}
children = parent.getContents(RemoteChildrenContentsType.getInstance(), filter);
}
@ -661,7 +660,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
}
else
{
children = listFolders(parent, filter);
children = listFolders(parent, filter, monitor);
}
}
else
@ -672,7 +671,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
}
else
{
children = listFiles(parent, filter);
children = listFiles(parent, filter, monitor);
}
}
}
@ -825,11 +824,11 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
{
if (showDirs && showFiles)
//children = listFoldersAndFiles((IRemoteFile)parent, filterString);
children = listFoldersAndFiles((IRemoteFile) parent, filterString);
children = listFoldersAndFiles((IRemoteFile) parent, filterString, monitor);
else if (showDirs)
children = listFolders((IRemoteFile) parent, filterString);
children = listFolders((IRemoteFile) parent, filterString, monitor);
else
children = listFiles((IRemoteFile) parent, filterString);
children = listFiles((IRemoteFile) parent, filterString, monitor);
if (sort && (children != null) && (children.length > 1))
Arrays.sort(children);
}
@ -846,9 +845,9 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
/**
* Return a list of roots/drives on the remote system
*/
public IRemoteFile[] listRoots() throws InterruptedException
public IRemoteFile[] listRoots(IProgressMonitor monitor) throws InterruptedException
{
return listRoots(getDefaultContext());
return listRoots(getDefaultContext(), monitor);
}
@ -856,9 +855,9 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
* 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
*/
public IRemoteFile[] listFolders(IRemoteFile parent) throws SystemMessageException
public IRemoteFile[] listFolders(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
{
return listFolders(parent, null);
return listFolders(parent, null, monitor);
}
/**
@ -866,7 +865,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
* @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
*/
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter) throws SystemMessageException
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
{
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
filterString.setPath(parent.getAbsolutePath());
@ -875,7 +874,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
filterString.setShowSubDirs(true);
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
//return listFolders(parent, fileNameFilter, context);
return listFolders(parent, null, context);
return listFolders(parent, null, context, monitor);
}
@ -883,9 +882,9 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
* 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
*/
public IRemoteFile[] listFiles(IRemoteFile parent) throws SystemMessageException
public IRemoteFile[] listFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
{
return listFiles(parent, null);
return listFiles(parent, null, monitor);
}
/**
@ -893,7 +892,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
* @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.
*/
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
{
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
filterString.setPath(parent.getAbsolutePath());
@ -901,7 +900,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
filterString.setShowFiles(true);
filterString.setShowSubDirs(false);
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
return listFiles(parent, fileNameFilter, context);
return listFiles(parent, fileNameFilter, context, monitor);
}
@ -909,9 +908,9 @@ 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.
* @param parent The parent folder to list folders and files in
*/
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent) throws SystemMessageException
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
{
return listFoldersAndFiles(parent, (String) null);
return listFoldersAndFiles(parent, (String) null, monitor);
}
/**
@ -922,7 +921,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
* @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.
*/
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter) throws SystemMessageException
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
{
@ -934,7 +933,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
filterString.setShowFiles(true);
filterString.setShowSubDirs(true);
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
return listFoldersAndFiles(parent, fileNameFilter, context);
return listFoldersAndFiles(parent, fileNameFilter, context, monitor);
}
@ -1067,40 +1066,10 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
/**
* Delete the given remote file or folder.
* <ul>
* <li>If the input is a folder, that folder must be empty for this to succeed.
* </ul>
*
* <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
*
* @param folderOrFile represents the object to be deleted.
* @return false if the given folder/file didn't exist to begin with, else true. Throws an exception if anything fails.
* @deprecated
*/
public boolean delete(IRemoteFile folderOrFile) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException
{
// child subclasses must override
return delete(folderOrFile, null);
}
/**
* Move a file or folder to a new target parent folder.
*
* @param sourceFolderOrFile The file or folder to move
* @param targetFolder The folder to move to. No guarantee it is on the same system, so be sure to check getSystemConnection()!
* @param newName The new name for the moved file or folder
* @return true iff the move succeeded
* @deprecated
*/
public boolean move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName) throws RemoteFileSecurityException, RemoteFileIOException
{
return move(sourceFolderOrFile, targetFolder, newName, null);
}

View file

@ -81,7 +81,7 @@ public class ValidatorFileUniqueName
);
try
{
IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder);
IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder, null);
if (contents!=null)
{
String[] names = new String[contents.length];

View file

@ -80,7 +80,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe
if (!parentRemoteFile.hasContents(RemoteChildrenContentsType.getInstance()))
{
// query all files to save time (so we can retrieve cached files
_fileSubSystem.listFiles(parentRemoteFile);
_fileSubSystem.listFiles(parentRemoteFile, null);
}
String path = fileNode.getValue() + "/" + fileNode.getName(); //$NON-NLS-1$

View file

@ -29,7 +29,6 @@ import org.eclipse.dstore.core.model.DataStore;
import org.eclipse.dstore.extra.internal.extra.DomainEvent;
import org.eclipse.dstore.extra.internal.extra.IDomainListener;
import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.CommunicationsEvent;
import org.eclipse.rse.core.subsystems.ICommunicationsListener;
import org.eclipse.rse.core.subsystems.IConnectorService;

View file

@ -49,7 +49,7 @@ public interface IRemoteProcess extends IHostProcess, IAdaptable
/**
* Get parent subsystem
*/
public RemoteProcessSubSystem getParentRemoteProcessSubSystem();
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
/**
* Return the connection this remote process is from.

View file

@ -34,7 +34,7 @@ public interface IRemoteProcessContext
/**
* Get parent subsystem
*/
public RemoteProcessSubSystem getParentRemoteProcessSubSystem();
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
/**
* Return the parent remote process object expanded to get this object, or null if no such parent
@ -54,7 +54,7 @@ public interface IRemoteProcessContext
/**
* Set parent subsystem
*/
public void setParentRemoteProcessSubSystem(RemoteProcessSubSystem parentSubSystem);
public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem parentSubSystem);
/**
* Set the parent remote process object expanded to get this object, or null if no such parent

View file

@ -17,6 +17,7 @@
package org.eclipse.rse.subsystems.processes.core.subsystem;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
@ -26,7 +27,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
* @author mjberger
*
*/
public interface RemoteProcessSubSystem extends ISubSystem
public interface IRemoteProcessSubSystem extends ISubSystem
{
// ----------------------
@ -52,31 +53,35 @@ public interface RemoteProcessSubSystem extends ISubSystem
* This version is called directly by users.
* @param processNameFilter filter the results according to this object
* @param context A context object that will be associated with each returned process
* @param monitor the progress monitor
* @return the list of all processes running on the host machine that correspond to the filter,
* or null if there are none.
*/
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processNameFilter, IRemoteProcessContext context) throws InterruptedException, SystemMessageException;
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processNameFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException;
/**
* Returns root processes
* @param context A context object that will be associated with each returned process
* @param monitor the progress monitor
*/
public IRemoteProcess[] listRoots(IRemoteProcessContext context);
public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor);
/**
* Return a list of all remote child processes of the given parent process on the remote system
* @param parent The parent process whose children to list
* @param context A context object that will be associated with each returned process
* @param monitor the progress monitor
*/
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context) throws SystemMessageException;
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a list of remote child processes of the given process, which match the filter.
* @param parent The parent process whose children to list
* @param processFilter The process filter to subset the list by, or null to return all child processes.
* @param context A context object that will be associated with each returned process
* @param monitor the progress monitor
*/
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context) throws SystemMessageException;
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException;
/**
* Given a process, return its parent process object.
@ -94,7 +99,6 @@ public interface RemoteProcessSubSystem extends ISubSystem
* Kill the given process.
*
* @param process represents the object to be killed.
* @param the signal to send to the process
* @return false if the given process doesn't exist, else true. Throws an exception if anything fails.
*/
public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException;

View file

@ -22,7 +22,7 @@ import java.util.Vector;
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
/**
* This class represents a place to hold contextual information stored within
@ -36,7 +36,7 @@ import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSyste
public class RemoteProcessContext implements IRemoteProcessContext
{
protected RemoteProcessSubSystem subsystem;
protected IRemoteProcessSubSystem subsystem;
protected IRemoteProcess parentProcess;
protected IHostProcessFilter filterString;
protected Vector allFilterStrings;
@ -44,7 +44,7 @@ public class RemoteProcessContext implements IRemoteProcessContext
/**
* Constructor that takes all inputs.
*/
public RemoteProcessContext(RemoteProcessSubSystem subsystem, IRemoteProcess parentProcessObject,
public RemoteProcessContext(IRemoteProcessSubSystem subsystem, IRemoteProcess parentProcessObject,
IHostProcessFilter filterString)
{
this.subsystem = subsystem;
@ -64,7 +64,7 @@ public class RemoteProcessContext implements IRemoteProcessContext
/**
* Set the parent subsystem
*/
public void setParentRemoteProcessSubSystem(RemoteProcessSubSystem subsystem)
public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem subsystem)
{
this.subsystem = subsystem;
}
@ -119,7 +119,7 @@ public class RemoteProcessContext implements IRemoteProcessContext
/**
* Return the parent subsystem
*/
public RemoteProcessSubSystem getParentRemoteProcessSubSystem()
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
{
return subsystem;
}

View file

@ -25,7 +25,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
@ -67,7 +67,7 @@ public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteCo
/* (non-Javadoc)
* @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcessSubSystem()
*/
public RemoteProcessSubSystem getParentRemoteProcessSubSystem()
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
{
return _context.getParentRemoteProcessSubSystem();
}
@ -77,7 +77,7 @@ public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteCo
*/
public IHost getSystemConnection()
{
RemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
if (ss == null)
return null;
else
@ -122,7 +122,7 @@ public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteCo
IRemoteProcess parentProcess = _context.getParentRemoteProcess();
if ((parentProcess == null) && getPPid() != -1)
{
RemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
if (ss != null)
{
try

View file

@ -31,7 +31,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
/**
* The implementation of the RemoteProcessSubSystem interface.
@ -46,7 +46,7 @@ import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSyste
*
*/
public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
RemoteProcessSubSystem, ICommunicationsListener
IRemoteProcessSubSystem, ICommunicationsListener
{
public RemoteProcessSubSystemImpl(IHost host, IConnectorService connectorService)
@ -132,7 +132,7 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
IRemoteProcess[] ps = null;
try
{
ps = listAllProcesses(rpf, context);
ps = listAllProcesses(rpf, context, monitor);
}
catch (SystemMessageException e)
{
@ -144,7 +144,7 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
/**
* At this point there is only one root process, the 'init' process with pid 1
*/
public IRemoteProcess[] listRoots(IRemoteProcessContext context)
public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor)
{
IRemoteProcess[] roots = new IRemoteProcess[1];
try
@ -163,7 +163,8 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
*/
public abstract IRemoteProcess[] listAllProcesses(
IHostProcessFilter processNameFilter,
IRemoteProcessContext context) throws InterruptedException,
IRemoteProcessContext context,
IProgressMonitor monitor) throws InterruptedException,
SystemMessageException;
/* (non-Javadoc)

View file

@ -17,10 +17,10 @@
package org.eclipse.rse.subsystems.processes.servicesubsystem;
import org.eclipse.rse.core.subsystems.IServiceSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
public interface IProcessServiceSubSystem extends RemoteProcessSubSystem, IServiceSubSystem
public interface IProcessServiceSubSystem extends IRemoteProcessSubSystem, IServiceSubSystem
{
}

View file

@ -17,7 +17,6 @@
package org.eclipse.rse.subsystems.processes.servicesubsystem;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
@ -118,30 +117,30 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
/* (non-Javadoc)
* @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#listAllProcesses(org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
*/
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context) throws InterruptedException, SystemMessageException
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException
{
checkIsConnected();
IHostProcess[] processes = getProcessService().listAllProcesses(null, processFilter);
IHostProcess[] processes = getProcessService().listAllProcesses(monitor, processFilter);
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
}
/* (non-Javadoc)
* @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listChildProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
*/
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context) throws SystemMessageException
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
{
checkIsConnected();
IHostProcess[] processes = getProcessService().listChildProcesses(null, parent.getPid(), processFilter);
IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid(), processFilter);
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
}
/* (non-Javadoc)
* @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listChildProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
*/
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context) throws SystemMessageException
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
{
checkIsConnected();
IHostProcess[] processes = getProcessService().listChildProcesses(null, parent.getPid());
IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid());
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
}

View file

@ -73,6 +73,7 @@ import org.eclipse.rse.core.model.ISystemMessageObject;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.model.ISystemPromptableObject;
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
@ -2549,13 +2550,17 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
if (matches == null) return;
TreeItem[] selected = getTree().getSelection();
getTree().deselectAll();
boolean refresh = false;
// STEP 3: process all references to the old name object
for (int idx = 0; idx < matches.size(); idx++) {
Item match = (Item) matches.elementAt(idx);
// a reference to this remote object
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
Object data = match.getData();
boolean refresh = false;
if (data != renameObject) // not a binary match
{
if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
@ -2563,14 +2568,24 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
} else {
refresh = true;
}
update(data, properties); // for refreshing non-structural properties in viewer when model changes
internalUpdate(match, data, properties);
//update(data, properties); // for refreshing non-structural properties in viewer when model changes
//System.out.println("Match found. refresh required? " + refresh);
if (refresh)
// if (refresh)
//refreshRemoteObject(data,null,false);
smartRefresh(new TreeItem[] { (TreeItem) match });
// smartRefresh(new TreeItem[] { (TreeItem) match });
}
}
if (refresh)
{
smartRefresh((TreeItem[])matches.toArray(new TreeItem[matches.size()]));
getTree().setSelection(selected);
}
// STEP 4: update property sheet, just in case.
updatePropertySheet();
@ -4418,7 +4433,10 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
if (ok) {
if (remoteAdapter != null)
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, null, oldFullName, this);
{
ISubSystem ss = adapter.getSubSystem(element);
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, oldFullName, this);
}
else
sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));

View file

@ -73,6 +73,7 @@ import org.eclipse.rse.core.model.ISystemMessageObject;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.model.ISystemPromptableObject;
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
@ -2549,13 +2550,17 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
if (matches == null) return;
TreeItem[] selected = getTree().getSelection();
getTree().deselectAll();
boolean refresh = false;
// STEP 3: process all references to the old name object
for (int idx = 0; idx < matches.size(); idx++) {
Item match = (Item) matches.elementAt(idx);
// a reference to this remote object
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
Object data = match.getData();
boolean refresh = false;
if (data != renameObject) // not a binary match
{
if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
@ -2563,14 +2568,24 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
} else {
refresh = true;
}
update(data, properties); // for refreshing non-structural properties in viewer when model changes
internalUpdate(match, data, properties);
//update(data, properties); // for refreshing non-structural properties in viewer when model changes
//System.out.println("Match found. refresh required? " + refresh);
if (refresh)
// if (refresh)
//refreshRemoteObject(data,null,false);
smartRefresh(new TreeItem[] { (TreeItem) match });
// smartRefresh(new TreeItem[] { (TreeItem) match });
}
}
if (refresh)
{
smartRefresh((TreeItem[])matches.toArray(new TreeItem[matches.size()]));
getTree().setSelection(selected);
}
// STEP 4: update property sheet, just in case.
updatePropertySheet();
@ -4418,7 +4433,10 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
if (ok) {
if (remoteAdapter != null)
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, null, oldFullName, this);
{
ISubSystem ss = adapter.getSubSystem(element);
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, oldFullName, this);
}
else
sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));

View file

@ -62,6 +62,7 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
import org.eclipse.rse.filters.SystemFilterPool;
import org.eclipse.rse.filters.SystemFilterReference;
import org.eclipse.rse.filters.SystemFilterStartHere;
import org.eclipse.rse.internal.model.SystemHostPool;
import org.eclipse.rse.internal.model.SystemModelChangeEvent;
@ -2970,6 +2971,16 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
String remoteResourceName = null;
if (remoteResource instanceof String)
remoteResourceName = (String)remoteResource;
else if (remoteResource instanceof SystemFilterReference)
{
ISystemFilterReference ref = (ISystemFilterReference)remoteResource;
ISubSystem ss = ref.getSubSystem();
remoteResource = ss.getTargetForFilter(ref);
ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
if (ra == null)
return null;
remoteResourceName = ra.getAbsoluteName(remoteResource);
}
else
{
ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);

View file

@ -148,7 +148,8 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe
_serverLaunchType = ServerLaunchType.get(launchTypeName);
IProperty daemonPortProperty = set.getProperty(KEY_DAEMON_PORT);
daemonPortProperty.setEnabled(_serverLaunchType.getType() == ServerLaunchType.DAEMON);
boolean daemon = _serverLaunchType == null || _serverLaunchType.getType() == ServerLaunchType.DAEMON;
daemonPortProperty.setEnabled(daemon);
daemonPortProperty.setLabel(SystemResources.RESID_CONNECTION_DAEMON_PORT_LABEL);
_daemonPort = Integer.parseInt(daemonPortProperty.getValue());
@ -156,13 +157,14 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe
IProperty autoDetectProperty = set.getProperty(KEY_AUTODETECT_SSL);
if (autoDetectProperty != null)
{
autoDetectProperty.setEnabled(_serverLaunchType.getType() == ServerLaunchType.REXEC);
boolean autoDetect = _serverLaunchType == null || _serverLaunchType.getType() == ServerLaunchType.REXEC;
autoDetectProperty.setEnabled(autoDetect);
autoDetectProperty.setLabel(SystemResources.RESID_SUBSYSTEM_AUTODETECT_LABEL);
_autoDetectSSL = Boolean.getBoolean(autoDetectProperty.getValue());
}
boolean usingRexec = _serverLaunchType.getType() == ServerLaunchType.REXEC;
boolean usingRexec = _serverLaunchType != null && _serverLaunchType.getType() == ServerLaunchType.REXEC;
IProperty rexecPortProperty = set.getProperty(KEY_REXEC_PORT);
rexecPortProperty.setEnabled(usingRexec);
rexecPortProperty.setLabel(SystemResources.RESID_CONNECTION_PORT_LABEL);
@ -197,6 +199,8 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe
set = createPropertySet(PROPERTY_SET_NAME, getDescription());
}
if (_serverLaunchType == null)
_serverLaunchType = ServerLaunchType.get(ServerLaunchType.DAEMON);
IProperty launchTypeProperty = set.addProperty(KEY_SERVER_LAUNCH_TYPE_NAME, _serverLaunchType.getName(), getServerLauncherPropertyType());
launchTypeProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS_LABEL);