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:
parent
47bc4d7548
commit
38db57e05c
29 changed files with 179 additions and 164 deletions
|
@ -199,7 +199,7 @@ public class FolderInfoPropertyPage
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(currFolder);
|
IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles( currFolder, null);
|
||||||
if ((folders != null) && (folders.length>0))
|
if ((folders != null) && (folders.length>0))
|
||||||
{
|
{
|
||||||
for (int idx=0; !stopped && (idx<folders.length); idx++)
|
for (int idx=0; !stopped && (idx<folders.length); idx++)
|
||||||
|
|
|
@ -257,7 +257,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
|
|
||||||
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
||||||
targetFS.createFolder(newTargetFolder);
|
targetFS.createFolder(newTargetFolder);
|
||||||
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < children.length; i++)
|
for (int i = 0; i < children.length; i++)
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class SystemExtractAction extends SystemBaseAction
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection);
|
IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection, monitor);
|
||||||
for (int j = 0; j < sources.length && !monitor.isCanceled(); j++)
|
for (int j = 0; j < sources.length && !monitor.isCanceled(); j++)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -346,7 +346,7 @@ public class UniversalFileTransferUtility
|
||||||
tempFolder = getTempFileFor(srcFileOrFolder);
|
tempFolder = getTempFileFor(srcFileOrFolder);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder,monitor);
|
||||||
|
|
||||||
|
|
||||||
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
|
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
|
||||||
|
@ -766,7 +766,7 @@ public class UniversalFileTransferUtility
|
||||||
IRemoteFile[] children = null;
|
IRemoteFile[] children = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
children = srcFS.listFoldersAndFiles(srcFileOrFolder);
|
children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -1532,7 +1532,7 @@ public class UniversalFileTransferUtility
|
||||||
if (!shouldExtract)
|
if (!shouldExtract)
|
||||||
{
|
{
|
||||||
// check for empty dir
|
// check for empty dir
|
||||||
IRemoteFile[] children = localSS.listFiles(currentSource);
|
IRemoteFile[] children = localSS.listFiles(currentSource, monitor);
|
||||||
|
|
||||||
if (children == null || children.length == 0)
|
if (children == null || children.length == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2136,7 +2136,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
|
||||||
targetFS.createFolder(newTargetFolder);
|
targetFS.createFolder(newTargetFolder);
|
||||||
|
|
||||||
IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder);
|
IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder, monitor);
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < children.length; i++)
|
for (int i = 0; i < children.length; i++)
|
||||||
|
|
|
@ -343,7 +343,7 @@ public class SystemNewFileWizard
|
||||||
if (rffs.listRoots())
|
if (rffs.listRoots())
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
IRemoteFile[] roots = parentSubSystem.listRoots();
|
IRemoteFile[] roots = parentSubSystem.listRoots(null);
|
||||||
for (int rootIdx = 0; (roots!=null) && (rootIdx<roots.length); rootIdx++)
|
for (int rootIdx = 0; (roots!=null) && (rootIdx<roots.length); rootIdx++)
|
||||||
{
|
{
|
||||||
if (uniqueNames.indexOf(roots[idx].getName())==-1)
|
if (uniqueNames.indexOf(roots[idx].getName())==-1)
|
||||||
|
|
|
@ -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.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
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.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.ISystemContextMenuConstants;
|
||||||
import org.eclipse.rse.ui.ISystemMessages;
|
import org.eclipse.rse.ui.ISystemMessages;
|
||||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
|
@ -211,7 +211,7 @@ public class SystemKillProcessAction extends SystemBaseDialogAction implements I
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
RemoteProcessSubSystem ss;
|
IRemoteProcessSubSystem ss;
|
||||||
boolean ok = false;
|
boolean ok = false;
|
||||||
ss = process.getParentRemoteProcessSubSystem();
|
ss = process.getParentRemoteProcessSubSystem();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.rse.core.filters.ISystemFilterReference;
|
||||||
import org.eclipse.rse.processes.ui.SystemProcessesResources;
|
import org.eclipse.rse.processes.ui.SystemProcessesResources;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
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.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.RSEUIPlugin;
|
||||||
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
||||||
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
|
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
|
||||||
|
@ -51,12 +51,12 @@ public class RemoteProcessesDialog extends SystemPromptDialog implements KeyList
|
||||||
{
|
{
|
||||||
private Text _nameFilterText;
|
private Text _nameFilterText;
|
||||||
private SystemTableView _viewer;
|
private SystemTableView _viewer;
|
||||||
private RemoteProcessSubSystem _subSystem;
|
private IRemoteProcessSubSystem _subSystem;
|
||||||
private String _executableFilter;
|
private String _executableFilter;
|
||||||
private Table _table;
|
private Table _table;
|
||||||
private IHostProcess _selected;
|
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);
|
super(shell, title);
|
||||||
_subSystem = subSystem;
|
_subSystem = subSystem;
|
||||||
|
|
|
@ -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.ISystemProcessRemoteConstants;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteTypes;
|
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.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.ISystemContextMenuConstants;
|
||||||
import org.eclipse.rse.ui.ISystemMessages;
|
import org.eclipse.rse.ui.ISystemMessages;
|
||||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
|
@ -159,14 +159,14 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
|
||||||
public Object[] getChildren(Object element)
|
public Object[] getChildren(Object element)
|
||||||
{
|
{
|
||||||
IRemoteProcess process = (IRemoteProcess) element;
|
IRemoteProcess process = (IRemoteProcess) element;
|
||||||
RemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
|
IRemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
|
||||||
IHostProcessFilter orgRpfs = process.getFilterString();
|
IHostProcessFilter orgRpfs = process.getFilterString();
|
||||||
|
|
||||||
Object[] children = null;
|
Object[] children = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
children = ss.listAllProcesses(orgRpfs, process.getContext());
|
children = ss.listAllProcesses(orgRpfs, process.getContext(), null);
|
||||||
if ((children == null) || (children.length == 0))
|
if ((children == null) || (children.length == 0))
|
||||||
{
|
{
|
||||||
children = EMPTY_LIST;
|
children = EMPTY_LIST;
|
||||||
|
|
|
@ -638,6 +638,11 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// allow cancel before doing the os query
|
||||||
|
if (monitor != null && monitor.isCanceled())
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (!fFilter.isGeneric())
|
if (!fFilter.isGeneric())
|
||||||
{
|
{
|
||||||
File file = new File(localParent, fileFilter);
|
File file = new File(localParent, fileFilter);
|
||||||
|
|
|
@ -506,7 +506,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*");
|
fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, currentText + "*");
|
fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, currentText + "*", null);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -183,7 +183,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return listRoots()[0];
|
return listRoots(null)[0];
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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 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) throws SystemMessageException
|
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String parentPath = null;
|
String parentPath = null;
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -337,7 +337,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
throw new SystemMessageException(msg);
|
throw new SystemMessageException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
IHostFile[] results = getFilesAndFolders(null, parentPath, fileNameFilter);
|
IHostFile[] results = getFilesAndFolders(monitor, 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);
|
||||||
|
@ -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 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) throws SystemMessageException
|
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context,IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String parentPath = null;
|
String parentPath = null;
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -370,7 +370,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
IHostFile[] results = null;
|
IHostFile[] results = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
results = getFiles(null, parentPath, fileNameFilter);
|
results = getFiles(monitor, parentPath, fileNameFilter);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
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 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) throws SystemMessageException
|
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String parentPath = null;
|
String parentPath = null;
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -406,7 +406,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
IHostFile[] results = null;
|
IHostFile[] results = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
results = getFolders(null, parentPath, fileNameFilter);
|
results = getFolders(monitor, parentPath, fileNameFilter);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -416,12 +416,12 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
return farr;
|
return farr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IRemoteFile[] listRoots(IRemoteFileContext context) throws InterruptedException
|
public IRemoteFile[] listRoots(IRemoteFileContext context, IProgressMonitor monitor) throws InterruptedException
|
||||||
{
|
{
|
||||||
IHostFile[] roots = null;
|
IHostFile[] roots = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
roots = getRoots(null);
|
roots = getRoots(monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,46 +108,52 @@ 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, 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
|
* 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
|
||||||
|
* @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.
|
* 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
|
||||||
|
* @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
|
* 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
|
||||||
|
* @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.
|
* 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.
|
||||||
|
* @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.
|
* 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
|
||||||
|
* @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
|
* 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.
|
* 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 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.
|
||||||
|
* @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.
|
* 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 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.
|
||||||
* @param context The holder of state information
|
* @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.
|
* 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 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
|
||||||
* @param context The holder of state information
|
* @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.
|
* 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 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.
|
||||||
* @param context The holder of state information
|
* @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.
|
* Given a search configuration, searches for its results.
|
||||||
* @param searchConfig a search configuration.
|
* @param searchConfig a search configuration.
|
||||||
|
@ -285,19 +294,7 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
*/
|
*/
|
||||||
public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
|
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;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the given remote file or folder.
|
* Delete the given remote file or folder.
|
||||||
|
@ -332,16 +329,6 @@ public interface IRemoteFileSubSystem extends ISubSystem{
|
||||||
*/
|
*/
|
||||||
public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileSecurityException, RemoteFileIOException;
|
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.
|
* 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)
|
* 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
|
* <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
|
* Returns the TCP/IP address for the local system that is accessible from
|
||||||
|
|
|
@ -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.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.services.files.RemoteFileIOException;
|
import org.eclipse.rse.services.files.RemoteFileIOException;
|
||||||
import org.eclipse.rse.services.files.RemoteFileSecurityException;
|
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.IHostSearchResult;
|
||||||
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
|
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
|
||||||
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
|
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
|
||||||
|
@ -584,7 +583,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
if (debugMode)
|
if (debugMode)
|
||||||
SystemBasePlugin.logInfo("...LISTROOTS = " + fs.listRoots());
|
SystemBasePlugin.logInfo("...LISTROOTS = " + fs.listRoots());
|
||||||
if (fs.listRoots())
|
if (fs.listRoots())
|
||||||
return listRoots(new RemoteFileContext(this, null, fs));
|
return listRoots(new RemoteFileContext(this, null, fs), monitor);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boolean showDirs = fs.getShowSubDirs();
|
boolean showDirs = fs.getShowSubDirs();
|
||||||
|
@ -639,17 +638,17 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
else if (hasFileContents)
|
else if (hasFileContents)
|
||||||
{
|
{
|
||||||
// already have the files, now add the folders
|
// already have the files, now add the folders
|
||||||
listFolders(parent, filter);
|
listFolders(parent, filter, monitor);
|
||||||
}
|
}
|
||||||
else if (hasFolderContents)
|
else if (hasFolderContents)
|
||||||
{
|
{
|
||||||
// already have the folders, now add the files
|
// already have the folders, now add the files
|
||||||
listFiles(parent, filter);
|
listFiles(parent, filter, monitor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// don't have anything - query both
|
// don't have anything - query both
|
||||||
listFoldersAndFiles(parent, filter);
|
listFoldersAndFiles(parent, filter, monitor);
|
||||||
}
|
}
|
||||||
children = parent.getContents(RemoteChildrenContentsType.getInstance(), filter);
|
children = parent.getContents(RemoteChildrenContentsType.getInstance(), filter);
|
||||||
}
|
}
|
||||||
|
@ -661,7 +660,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
children = listFolders(parent, filter);
|
children = listFolders(parent, filter, monitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -672,7 +671,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (showDirs && showFiles)
|
||||||
//children = listFoldersAndFiles((IRemoteFile)parent, filterString);
|
//children = listFoldersAndFiles((IRemoteFile)parent, filterString);
|
||||||
children = listFoldersAndFiles((IRemoteFile) parent, filterString);
|
children = listFoldersAndFiles((IRemoteFile) parent, filterString, monitor);
|
||||||
else if (showDirs)
|
else if (showDirs)
|
||||||
children = listFolders((IRemoteFile) parent, filterString);
|
children = listFolders((IRemoteFile) parent, filterString, monitor);
|
||||||
else
|
else
|
||||||
children = listFiles((IRemoteFile) parent, filterString);
|
children = listFiles((IRemoteFile) parent, filterString, monitor);
|
||||||
if (sort && (children != null) && (children.length > 1))
|
if (sort && (children != null) && (children.length > 1))
|
||||||
Arrays.sort(children);
|
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
|
* 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
|
* 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) 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 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) throws SystemMessageException
|
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
||||||
filterString.setPath(parent.getAbsolutePath());
|
filterString.setPath(parent.getAbsolutePath());
|
||||||
|
@ -875,7 +874,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
filterString.setShowSubDirs(true);
|
filterString.setShowSubDirs(true);
|
||||||
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
|
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
|
||||||
//return listFolders(parent, fileNameFilter, context);
|
//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
|
* 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) 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 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) throws SystemMessageException
|
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
|
||||||
filterString.setPath(parent.getAbsolutePath());
|
filterString.setPath(parent.getAbsolutePath());
|
||||||
|
@ -901,7 +900,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
||||||
filterString.setShowFiles(true);
|
filterString.setShowFiles(true);
|
||||||
filterString.setShowSubDirs(false);
|
filterString.setShowSubDirs(false);
|
||||||
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
|
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.
|
* 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) 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 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) 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.setShowFiles(true);
|
||||||
filterString.setShowSubDirs(true);
|
filterString.setShowSubDirs(true);
|
||||||
RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class ValidatorFileUniqueName
|
||||||
);
|
);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder);
|
IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder, null);
|
||||||
if (contents!=null)
|
if (contents!=null)
|
||||||
{
|
{
|
||||||
String[] names = new String[contents.length];
|
String[] names = new String[contents.length];
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe
|
||||||
if (!parentRemoteFile.hasContents(RemoteChildrenContentsType.getInstance()))
|
if (!parentRemoteFile.hasContents(RemoteChildrenContentsType.getInstance()))
|
||||||
{
|
{
|
||||||
// query all files to save time (so we can retrieve cached files
|
// 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$
|
String path = fileNode.getValue() + "/" + fileNode.getName(); //$NON-NLS-1$
|
||||||
|
|
|
@ -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.DomainEvent;
|
||||||
import org.eclipse.dstore.extra.internal.extra.IDomainListener;
|
import org.eclipse.dstore.extra.internal.extra.IDomainListener;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
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.CommunicationsEvent;
|
||||||
import org.eclipse.rse.core.subsystems.ICommunicationsListener;
|
import org.eclipse.rse.core.subsystems.ICommunicationsListener;
|
||||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public interface IRemoteProcess extends IHostProcess, IAdaptable
|
||||||
/**
|
/**
|
||||||
* Get parent subsystem
|
* Get parent subsystem
|
||||||
*/
|
*/
|
||||||
public RemoteProcessSubSystem getParentRemoteProcessSubSystem();
|
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the connection this remote process is from.
|
* Return the connection this remote process is from.
|
||||||
|
|
|
@ -34,7 +34,7 @@ public interface IRemoteProcessContext
|
||||||
/**
|
/**
|
||||||
* Get parent subsystem
|
* 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
|
* 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
|
* 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
|
* Set the parent remote process object expanded to get this object, or null if no such parent
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
package org.eclipse.rse.subsystems.processes.core.subsystem;
|
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.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
||||||
|
@ -26,7 +27,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
||||||
* @author mjberger
|
* @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.
|
* This version is called directly by users.
|
||||||
* @param processNameFilter filter the results according to this object
|
* @param processNameFilter filter the results according to this object
|
||||||
* @param context A context object that will be associated with each returned process
|
* @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,
|
* @return the list of all processes running on the host machine that correspond to the filter,
|
||||||
* or null if there are none.
|
* 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
|
* Returns root processes
|
||||||
* @param context A context object that will be associated with each returned process
|
* @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
|
* 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 parent The parent process whose children to list
|
||||||
* @param context A context object that will be associated with each returned process
|
* @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.
|
* 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 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 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 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.
|
* Given a process, return its parent process object.
|
||||||
|
@ -94,7 +99,6 @@ public interface RemoteProcessSubSystem extends ISubSystem
|
||||||
* Kill the given process.
|
* Kill the given process.
|
||||||
*
|
*
|
||||||
* @param process represents the object to be killed.
|
* @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.
|
* @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;
|
public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException;
|
|
@ -22,7 +22,7 @@ import java.util.Vector;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
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.IRemoteProcess;
|
||||||
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
|
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
|
* 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
|
public class RemoteProcessContext implements IRemoteProcessContext
|
||||||
{
|
{
|
||||||
|
|
||||||
protected RemoteProcessSubSystem subsystem;
|
protected IRemoteProcessSubSystem subsystem;
|
||||||
protected IRemoteProcess parentProcess;
|
protected IRemoteProcess parentProcess;
|
||||||
protected IHostProcessFilter filterString;
|
protected IHostProcessFilter filterString;
|
||||||
protected Vector allFilterStrings;
|
protected Vector allFilterStrings;
|
||||||
|
@ -44,7 +44,7 @@ public class RemoteProcessContext implements IRemoteProcessContext
|
||||||
/**
|
/**
|
||||||
* Constructor that takes all inputs.
|
* Constructor that takes all inputs.
|
||||||
*/
|
*/
|
||||||
public RemoteProcessContext(RemoteProcessSubSystem subsystem, IRemoteProcess parentProcessObject,
|
public RemoteProcessContext(IRemoteProcessSubSystem subsystem, IRemoteProcess parentProcessObject,
|
||||||
IHostProcessFilter filterString)
|
IHostProcessFilter filterString)
|
||||||
{
|
{
|
||||||
this.subsystem = subsystem;
|
this.subsystem = subsystem;
|
||||||
|
@ -64,7 +64,7 @@ public class RemoteProcessContext implements IRemoteProcessContext
|
||||||
/**
|
/**
|
||||||
* Set the parent subsystem
|
* Set the parent subsystem
|
||||||
*/
|
*/
|
||||||
public void setParentRemoteProcessSubSystem(RemoteProcessSubSystem subsystem)
|
public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem subsystem)
|
||||||
{
|
{
|
||||||
this.subsystem = subsystem;
|
this.subsystem = subsystem;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ public class RemoteProcessContext implements IRemoteProcessContext
|
||||||
/**
|
/**
|
||||||
* Return the parent subsystem
|
* Return the parent subsystem
|
||||||
*/
|
*/
|
||||||
public RemoteProcessSubSystem getParentRemoteProcessSubSystem()
|
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
|
||||||
{
|
{
|
||||||
return subsystem;
|
return subsystem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
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.IRemoteProcess;
|
||||||
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
|
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.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteCo
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcessSubSystem()
|
* @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcessSubSystem()
|
||||||
*/
|
*/
|
||||||
public RemoteProcessSubSystem getParentRemoteProcessSubSystem()
|
public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
|
||||||
{
|
{
|
||||||
return _context.getParentRemoteProcessSubSystem();
|
return _context.getParentRemoteProcessSubSystem();
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteCo
|
||||||
*/
|
*/
|
||||||
public IHost getSystemConnection()
|
public IHost getSystemConnection()
|
||||||
{
|
{
|
||||||
RemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
|
IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
|
||||||
if (ss == null)
|
if (ss == null)
|
||||||
return null;
|
return null;
|
||||||
else
|
else
|
||||||
|
@ -122,7 +122,7 @@ public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteCo
|
||||||
IRemoteProcess parentProcess = _context.getParentRemoteProcess();
|
IRemoteProcess parentProcess = _context.getParentRemoteProcess();
|
||||||
if ((parentProcess == null) && getPPid() != -1)
|
if ((parentProcess == null) && getPPid() != -1)
|
||||||
{
|
{
|
||||||
RemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
|
IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
|
||||||
if (ss != null)
|
if (ss != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -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.IRemoteProcess;
|
||||||
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
|
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.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.
|
* 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
|
public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
|
||||||
RemoteProcessSubSystem, ICommunicationsListener
|
IRemoteProcessSubSystem, ICommunicationsListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public RemoteProcessSubSystemImpl(IHost host, IConnectorService connectorService)
|
public RemoteProcessSubSystemImpl(IHost host, IConnectorService connectorService)
|
||||||
|
@ -132,7 +132,7 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
|
||||||
IRemoteProcess[] ps = null;
|
IRemoteProcess[] ps = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ps = listAllProcesses(rpf, context);
|
ps = listAllProcesses(rpf, context, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
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
|
* 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];
|
IRemoteProcess[] roots = new IRemoteProcess[1];
|
||||||
try
|
try
|
||||||
|
@ -163,7 +163,8 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
|
||||||
*/
|
*/
|
||||||
public abstract IRemoteProcess[] listAllProcesses(
|
public abstract IRemoteProcess[] listAllProcesses(
|
||||||
IHostProcessFilter processNameFilter,
|
IHostProcessFilter processNameFilter,
|
||||||
IRemoteProcessContext context) throws InterruptedException,
|
IRemoteProcessContext context,
|
||||||
|
IProgressMonitor monitor) throws InterruptedException,
|
||||||
SystemMessageException;
|
SystemMessageException;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
||||||
|
|
||||||
import org.eclipse.rse.core.subsystems.IServiceSubSystem;
|
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
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,6 @@
|
||||||
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
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.subsystems.IConnectorService;
|
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
|
import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
|
||||||
|
@ -118,30 +117,30 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
|
||||||
/* (non-Javadoc)
|
/* (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)
|
* @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();
|
checkIsConnected();
|
||||||
IHostProcess[] processes = getProcessService().listAllProcesses(null, processFilter);
|
IHostProcess[] processes = getProcessService().listAllProcesses(monitor, processFilter);
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
|
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (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)
|
* @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();
|
checkIsConnected();
|
||||||
IHostProcess[] processes = getProcessService().listChildProcesses(null, parent.getPid(), processFilter);
|
IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid(), processFilter);
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (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)
|
* @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();
|
checkIsConnected();
|
||||||
IHostProcess[] processes = getProcessService().listChildProcesses(null, parent.getPid());
|
IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid());
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ import org.eclipse.rse.core.model.ISystemMessageObject;
|
||||||
import org.eclipse.rse.core.model.ISystemRegistry;
|
import org.eclipse.rse.core.model.ISystemRegistry;
|
||||||
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
|
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
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.ISystemPromptableObject;
|
||||||
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
|
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
|
||||||
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
|
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
|
||||||
|
@ -2549,13 +2550,17 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
|
matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
|
||||||
if (matches == null) return;
|
if (matches == null) return;
|
||||||
|
|
||||||
|
TreeItem[] selected = getTree().getSelection();
|
||||||
|
getTree().deselectAll();
|
||||||
|
|
||||||
|
boolean refresh = false;
|
||||||
// STEP 3: process all references to the old name object
|
// STEP 3: process all references to the old name object
|
||||||
for (int idx = 0; idx < matches.size(); idx++) {
|
for (int idx = 0; idx < matches.size(); idx++) {
|
||||||
Item match = (Item) matches.elementAt(idx);
|
Item match = (Item) matches.elementAt(idx);
|
||||||
// a reference to this remote object
|
// a reference to this remote object
|
||||||
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
|
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
|
||||||
Object data = match.getData();
|
Object data = match.getData();
|
||||||
boolean refresh = false;
|
|
||||||
if (data != renameObject) // not a binary match
|
if (data != renameObject) // not a binary match
|
||||||
{
|
{
|
||||||
if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
|
if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
|
||||||
|
@ -2563,13 +2568,23 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
} else {
|
} else {
|
||||||
refresh = true;
|
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);
|
//System.out.println("Match found. refresh required? " + refresh);
|
||||||
if (refresh)
|
// if (refresh)
|
||||||
//refreshRemoteObject(data,null,false);
|
//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.
|
// STEP 4: update property sheet, just in case.
|
||||||
updatePropertySheet();
|
updatePropertySheet();
|
||||||
|
@ -4418,7 +4433,10 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
|
ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
if (remoteAdapter != null)
|
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
|
else
|
||||||
sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
|
sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
|
||||||
|
|
|
@ -73,6 +73,7 @@ import org.eclipse.rse.core.model.ISystemMessageObject;
|
||||||
import org.eclipse.rse.core.model.ISystemRegistry;
|
import org.eclipse.rse.core.model.ISystemRegistry;
|
||||||
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
|
import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
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.ISystemPromptableObject;
|
||||||
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
|
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
|
||||||
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
|
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
|
||||||
|
@ -2549,13 +2550,17 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
|
matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
|
||||||
if (matches == null) return;
|
if (matches == null) return;
|
||||||
|
|
||||||
|
TreeItem[] selected = getTree().getSelection();
|
||||||
|
getTree().deselectAll();
|
||||||
|
|
||||||
|
boolean refresh = false;
|
||||||
// STEP 3: process all references to the old name object
|
// STEP 3: process all references to the old name object
|
||||||
for (int idx = 0; idx < matches.size(); idx++) {
|
for (int idx = 0; idx < matches.size(); idx++) {
|
||||||
Item match = (Item) matches.elementAt(idx);
|
Item match = (Item) matches.elementAt(idx);
|
||||||
// a reference to this remote object
|
// a reference to this remote object
|
||||||
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
|
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
|
||||||
Object data = match.getData();
|
Object data = match.getData();
|
||||||
boolean refresh = false;
|
|
||||||
if (data != renameObject) // not a binary match
|
if (data != renameObject) // not a binary match
|
||||||
{
|
{
|
||||||
if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
|
if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
|
||||||
|
@ -2563,13 +2568,23 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
} else {
|
} else {
|
||||||
refresh = true;
|
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);
|
//System.out.println("Match found. refresh required? " + refresh);
|
||||||
if (refresh)
|
// if (refresh)
|
||||||
//refreshRemoteObject(data,null,false);
|
//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.
|
// STEP 4: update property sheet, just in case.
|
||||||
updatePropertySheet();
|
updatePropertySheet();
|
||||||
|
@ -4418,7 +4433,10 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
|
ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
if (remoteAdapter != null)
|
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
|
else
|
||||||
sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
|
sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
|
||||||
|
|
|
@ -62,6 +62,7 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
|
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
|
||||||
import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
|
import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
|
||||||
import org.eclipse.rse.filters.SystemFilterPool;
|
import org.eclipse.rse.filters.SystemFilterPool;
|
||||||
|
import org.eclipse.rse.filters.SystemFilterReference;
|
||||||
import org.eclipse.rse.filters.SystemFilterStartHere;
|
import org.eclipse.rse.filters.SystemFilterStartHere;
|
||||||
import org.eclipse.rse.internal.model.SystemHostPool;
|
import org.eclipse.rse.internal.model.SystemHostPool;
|
||||||
import org.eclipse.rse.internal.model.SystemModelChangeEvent;
|
import org.eclipse.rse.internal.model.SystemModelChangeEvent;
|
||||||
|
@ -2970,7 +2971,17 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
String remoteResourceName = null;
|
String remoteResourceName = null;
|
||||||
if (remoteResource instanceof String)
|
if (remoteResource instanceof String)
|
||||||
remoteResourceName = (String)remoteResource;
|
remoteResourceName = (String)remoteResource;
|
||||||
else
|
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);
|
ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
|
||||||
if (ra == null)
|
if (ra == null)
|
||||||
|
|
|
@ -148,7 +148,8 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe
|
||||||
_serverLaunchType = ServerLaunchType.get(launchTypeName);
|
_serverLaunchType = ServerLaunchType.get(launchTypeName);
|
||||||
|
|
||||||
IProperty daemonPortProperty = set.getProperty(KEY_DAEMON_PORT);
|
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);
|
daemonPortProperty.setLabel(SystemResources.RESID_CONNECTION_DAEMON_PORT_LABEL);
|
||||||
|
|
||||||
_daemonPort = Integer.parseInt(daemonPortProperty.getValue());
|
_daemonPort = Integer.parseInt(daemonPortProperty.getValue());
|
||||||
|
@ -156,13 +157,14 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe
|
||||||
IProperty autoDetectProperty = set.getProperty(KEY_AUTODETECT_SSL);
|
IProperty autoDetectProperty = set.getProperty(KEY_AUTODETECT_SSL);
|
||||||
if (autoDetectProperty != null)
|
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);
|
autoDetectProperty.setLabel(SystemResources.RESID_SUBSYSTEM_AUTODETECT_LABEL);
|
||||||
|
|
||||||
_autoDetectSSL = Boolean.getBoolean(autoDetectProperty.getValue());
|
_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);
|
IProperty rexecPortProperty = set.getProperty(KEY_REXEC_PORT);
|
||||||
rexecPortProperty.setEnabled(usingRexec);
|
rexecPortProperty.setEnabled(usingRexec);
|
||||||
rexecPortProperty.setLabel(SystemResources.RESID_CONNECTION_PORT_LABEL);
|
rexecPortProperty.setLabel(SystemResources.RESID_CONNECTION_PORT_LABEL);
|
||||||
|
@ -197,6 +199,8 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe
|
||||||
set = createPropertySet(PROPERTY_SET_NAME, getDescription());
|
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());
|
IProperty launchTypeProperty = set.addProperty(KEY_SERVER_LAUNCH_TYPE_NAME, _serverLaunchType.getName(), getServerLauncherPropertyType());
|
||||||
launchTypeProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS_LABEL);
|
launchTypeProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS_LABEL);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue