1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

[186128][refactoring] Move IProgressMonitor last in public base classes

This commit is contained in:
Martin Oberhuber 2007-05-14 09:44:39 +00:00
parent 057d5c46a9
commit daddc54dae
40 changed files with 211 additions and 210 deletions

View file

@ -4,7 +4,7 @@
<head> <head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > <meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css"> <LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystem Class After Editing</title> <title>DeveloperSubSystem Class After Editing</title>
</head> </head>
@ -94,7 +94,7 @@ public class DeveloperSubSystem extends SubSystem
* @param monitor - the progress monitor in effect while this operation performs * @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter. * @param filterString - one of the filter strings from the expanded filter.
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -125,7 +125,7 @@ public class DeveloperSubSystem extends SubSystem
* @param parent - the parent resource object being expanded * @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported. * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
*/ */
<a id="resolveFilterString"/>protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) <a id="resolveFilterString"/>protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {

View file

@ -4,7 +4,7 @@
<head> <head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > <meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css"> <LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title> <title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title>
</head> </head>
@ -94,7 +94,7 @@ public class DeveloperSubSystem extends SubSystem
* @param monitor - the progress monitor in effect while this operation performs * @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter. * @param filterString - one of the filter strings from the expanded filter.
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -156,7 +156,7 @@ public class DeveloperSubSystem extends SubSystem
* @param parent - the parent resource object being expanded * @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported. * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {

View file

@ -12,7 +12,6 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE. * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
********************************************************************************/ ********************************************************************************/
package samples.subsystems; package samples.subsystems;
@ -89,11 +88,10 @@ public class DeveloperSubSystem extends SubSystem
* When a filter is expanded, this is called for each filter string in the filter. * When a filter is expanded, this is called for each filter string in the filter.
* Using the criteria of the filter string, it must return objects representing remote resources. * Using the criteria of the filter string, it must return objects representing remote resources.
* For us, this will be an array of TeamResource objects. * For us, this will be an array of TeamResource objects.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter. * @param filterString - one of the filter strings from the expanded filter.
* @param monitor - the progress monitor in effect while this operation performs
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -150,12 +148,11 @@ public class DeveloperSubSystem extends SubSystem
* When a remote resource is expanded, this is called to return the children of the resource, if * When a remote resource is expanded, this is called to return the children of the resource, if
* the resource's adapter states the resource object is expandable. <br> * the resource's adapter states the resource object is expandable. <br>
* For us, it is a Team resource that was expanded, and an array of Developer resources will be returned. * For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param parent - the parent resource object being expanded * @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported. * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
* @param monitor - the progress monitor in effect while this operation performs
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {

View file

@ -14,6 +14,7 @@
* David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.connectorservice.dstore; package org.eclipse.rse.connectorservice.dstore;
@ -533,7 +534,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
if (autoDetectSSL) timeout = 3000; if (autoDetectSSL) timeout = 3000;
else setSSLProperties(isUsingSSL()); else setSSLProperties(isUsingSSL());
int iServerPort = launchUsingRexec(monitor, info, serverLauncher); int iServerPort = launchUsingRexec(info, serverLauncher, monitor);
if(iServerPort != 0) if(iServerPort != 0)
{ {
@ -552,7 +553,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
{ {
if (setSSLProperties(true)) if (setSSLProperties(true))
{ {
iServerPort = launchUsingRexec(monitor, info, serverLauncher); iServerPort = launchUsingRexec(info, serverLauncher, monitor);
if (iServerPort != 0) if (iServerPort != 0)
{ {
clientConnection.setPort("" + iServerPort); //$NON-NLS-1$ clientConnection.setPort("" + iServerPort); //$NON-NLS-1$
@ -1142,7 +1143,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
} }
} }
protected int launchUsingRexec(IProgressMonitor monitor, SystemSignonInformation info, IServerLauncherProperties serverLauncherProperties) throws Exception protected int launchUsingRexec(SystemSignonInformation info, IServerLauncherProperties serverLauncherProperties, IProgressMonitor monitor) throws Exception
{ {
IServerLauncher starter = getRemoteServerLauncher(); IServerLauncher starter = getRemoteServerLauncher();
starter.setSignonInformation(info); starter.setSignonInformation(info);

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.compare; package org.eclipse.rse.files.ui.compare;
@ -41,8 +41,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
public class SystemCompareInput extends CompareEditorInput public class SystemCompareInput extends CompareEditorInput
{ {
@ -208,7 +206,7 @@ public class SystemCompareInput extends CompareEditorInput
{ {
try try
{ {
commit(pm, (DiffNode) fRoot); commit((DiffNode) fRoot, pm);
} }
finally finally
{ {
@ -223,7 +221,7 @@ public class SystemCompareInput extends CompareEditorInput
/* /*
* Recursively walks the diff tree and commits all changes. * Recursively walks the diff tree and commits all changes.
*/ */
private void commit(IProgressMonitor pm, DiffNode node) throws CoreException private void commit(DiffNode node, IProgressMonitor pm) throws CoreException
{ {
if (node instanceof MyDiffNode) if (node instanceof MyDiffNode)
((MyDiffNode) node).clearDirty(); ((MyDiffNode) node).clearDirty();
@ -243,7 +241,7 @@ public class SystemCompareInput extends CompareEditorInput
{ {
IDiffElement element = children[i]; IDiffElement element = children[i];
if (element instanceof DiffNode) if (element instanceof DiffNode)
commit(pm, (DiffNode) element); commit((DiffNode) element, pm);
} }
} }
} }

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.resources; package org.eclipse.rse.files.ui.resources;
@ -1165,13 +1166,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
*/ */
public void open(IProgressMonitor monitor) public void open(IProgressMonitor monitor)
{ {
open(monitor, false); open(false, monitor);
} }
/** /**
* Open in editor * Open in editor
*/ */
public void open(IProgressMonitor monitor, boolean readOnly) public void open(boolean readOnly, IProgressMonitor monitor)
{ {
try try

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions; package org.eclipse.rse.internal.files.ui.actions;
@ -54,7 +55,6 @@ import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
/** /**
* Copy selected files and folders action. * Copy selected files and folders action.
*/ */
@ -176,13 +176,13 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
* @param monitor Usually not needed
* @param targetContainer will be the IRemoteFile folder selected to copy into * @param targetContainer will be the IRemoteFile folder selected to copy into
* @param oldObject will be the IRemoteFile object currently being copied * @param oldObject will be the IRemoteFile object currently being copied
* @param newName will be the new name to give the oldObject on copy * @param newName will be the new name to give the oldObject on copy
* @param monitor Usually not needed
* @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
targetFolder = (IRemoteFile)targetContainer; targetFolder = (IRemoteFile)targetContainer;
@ -270,7 +270,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
{ {
IRemoteFile child = children[i]; IRemoteFile child = children[i];
monitor.subTask("copying " + child.getName()); //$NON-NLS-1$ monitor.subTask("copying " + child.getName()); //$NON-NLS-1$
doCopy(monitor, newTargetFolder, child, child.getName()); doCopy(newTargetFolder, child, child.getName(), monitor);
monitor.worked(1); monitor.worked(1);
} }
} }

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions; package org.eclipse.rse.internal.files.ui.actions;
@ -32,7 +33,6 @@ import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
/** /**
* Move selected files and folders action. * Move selected files and folders action.
*/ */
@ -68,13 +68,13 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
* @param monitor Usually not needed
* @param targetContainer will be the IRemoteFile folder selected to move into * @param targetContainer will be the IRemoteFile folder selected to move into
* @param oldObject will be the IRemoteFile object currently being moved * @param oldObject will be the IRemoteFile object currently being moved
* @param newName will be the new name to give the oldObject on move * @param newName will be the new name to give the oldObject on move
* @param monitor Usually not needed
* @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
IRemoteFile targetFolder = (IRemoteFile)targetContainer; IRemoteFile targetFolder = (IRemoteFile)targetContainer;

View file

@ -18,6 +18,7 @@
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -145,7 +146,6 @@ import org.eclipse.ui.progress.IElementCollector;
import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.PropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor;
/** /**
* Adapter for displaying remote file system objects in tree views. * Adapter for displaying remote file system objects in tree views.
* These are children of RemoteFileSubSystem filter strings * These are children of RemoteFileSubSystem filter strings
@ -583,7 +583,7 @@ public class SystemViewRemoteFileAdapter
*/ */
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{ {
return internalGetChildren(monitor, element, null); return internalGetChildren(element, null, monitor);
} }
/** /**
@ -592,10 +592,10 @@ public class SystemViewRemoteFileAdapter
*/ */
public Object[] getChildren(IContextObject context, IProgressMonitor monitor) public Object[] getChildren(IContextObject context, IProgressMonitor monitor)
{ {
return internalGetChildren(monitor, context.getModelObject(), context.getFilterReference()); return internalGetChildren(context.getModelObject(), context.getFilterReference(), monitor);
} }
private synchronized Object[] internalGetChildren(IProgressMonitor monitor, IAdaptable element, ISystemFilterReference filterReference) private synchronized Object[] internalGetChildren(IAdaptable element, ISystemFilterReference filterReference, IProgressMonitor monitor)
{ {
//System.out.println("Inside getChildren for: "+element); //System.out.println("Inside getChildren for: "+element);
IRemoteFile file = (IRemoteFile) element; IRemoteFile file = (IRemoteFile) element;
@ -1822,7 +1822,7 @@ public class SystemViewRemoteFileAdapter
Object[] children = null; Object[] children = null;
try try
{ {
children = ((SubSystem)srcSubSystem).internalResolveFilterStrings(monitor, filterReference.getReferencedFilter().getFilterStrings()); children = ((SubSystem)srcSubSystem).internalResolveFilterStrings(filterReference.getReferencedFilter().getFilterStrings(), monitor);
} }
catch (Exception e) catch (Exception e)
{ {
@ -2110,7 +2110,7 @@ public class SystemViewRemoteFileAdapter
Object[] children = null; Object[] children = null;
try try
{ {
children = filterSubSystem.internalResolveFilterStrings(monitor, filterReference.getReferencedFilter().getFilterStrings()); children = filterSubSystem.internalResolveFilterStrings(filterReference.getReferencedFilter().getFilterStrings(), monitor);
} }
catch (Exception e) catch (Exception e)
{ {

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.processes.ui.actions; package org.eclipse.rse.internal.processes.ui.actions;
@ -49,7 +50,6 @@ import org.eclipse.rse.ui.messages.SystemMessageDialog;
import org.eclipse.rse.ui.model.ISystemRegistryUI; import org.eclipse.rse.ui.model.ISystemRegistryUI;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
public class SystemKillProcessAction extends SystemBaseDialogAction implements IRunnableWithProgress public class SystemKillProcessAction extends SystemBaseDialogAction implements IRunnableWithProgress
{ {
@ -182,7 +182,7 @@ public class SystemKillProcessAction extends SystemBaseDialogAction implements I
if (signalType.equals(SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT)) if (signalType.equals(SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT))
signalType = ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT; signalType = ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT;
monitor.subTask(getKillingMessage(signalType, currentProcess.getName()).getLevelOneText()); monitor.subTask(getKillingMessage(signalType, currentProcess.getName()).getLevelOneText());
killedOk = doKill(monitor, signalType, currentProcess); killedOk = doKill(currentProcess, signalType, monitor);
monitor.worked(1); monitor.worked(1);
} }
monitor.done(); monitor.done();
@ -203,11 +203,11 @@ public class SystemKillProcessAction extends SystemBaseDialogAction implements I
} }
/** /**
* @param monitor Usually not needed
* @param signal the signal to be sent to the remote process
* @param process the process to send the signal to * @param process the process to send the signal to
* @param signal the signal to be sent to the remote process
* @param monitor Usually not needed
*/ */
protected boolean doKill(IProgressMonitor monitor, String signal, IRemoteProcess process) protected boolean doKill(IRemoteProcess process, String signal, IProgressMonitor monitor)
throws Exception throws Exception
{ {

View file

@ -636,7 +636,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
} }
try try
{ {
DownloadListener dlistener = new DownloadListener(monitor, status, localFile, remotePath, fileLength); DownloadListener dlistener = new DownloadListener(status, localFile, remotePath, fileLength, monitor);
try try
{ {
dlistener.waitForUpdate(); dlistener.waitForUpdate();
@ -729,7 +729,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
buf.append(name); buf.append(name);
de = getElementFor(buf.toString()); de = getElementFor(buf.toString());
} }
dsQueryCommand(monitor, de, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); dsQueryCommand(de, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
return new DStoreHostFile(de); return new DStoreHostFile(de);
} }
@ -831,7 +831,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_CREATE_FILE); DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_CREATE_FILE, monitor);
if (status == null) return null; if (status == null) return null;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
@ -851,7 +851,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
String remotePath = remoteParent + getSeparator(remoteParent) + folderName; String remotePath = remoteParent + getSeparator(remoteParent) + folderName;
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_CREATE_FOLDER); DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_CREATE_FOLDER, monitor);
if (status == null) return null; if (status == null) return null;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
@ -871,7 +871,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
{ {
String remotePath = remoteParent + getSeparator(remoteParent) + fileName; String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_DELETE); DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_DELETE, monitor);
if (status == null) return false; if (status == null) return false;
if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)) if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
{ {
@ -896,7 +896,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
if (de != null) dataElements.add(de); if (de != null) dataElements.add(de);
} }
DataElement status = dsStatusCommand(monitor, (DataElement) dataElements.get(0), dataElements, IUniversalDataStoreConstants.C_DELETE_BATCH); DataElement status = dsStatusCommand((DataElement) dataElements.get(0), dataElements, IUniversalDataStoreConstants.C_DELETE_BATCH, monitor);
if (status == null) return false; if (status == null) return false;
if (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED)) if (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED))
throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$ throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
@ -909,7 +909,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
de.setAttribute(DE.A_SOURCE, newName); de.setAttribute(DE.A_SOURCE, newName);
DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_RENAME); DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_RENAME, monitor);
if (status == null) return false; if (status == null) return false;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
@ -920,7 +920,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
} }
} }
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException
{ {
boolean retVal = rename(remoteParent, oldName, newName, monitor); boolean retVal = rename(remoteParent, oldName, newName, monitor);
String newPath = remoteParent + getSeparator(remoteParent) + newName; String newPath = remoteParent + getSeparator(remoteParent) + newName;
@ -1051,7 +1051,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement tgtDE = getElementFor(tgtParent); DataElement tgtDE = getElementFor(tgtParent);
if (tgtDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) if (tgtDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
{ {
dsQueryCommand(monitor, tgtDE, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); dsQueryCommand(tgtDE, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
} }
DataElement cpCmd = getCommandDescriptor(tgtDE, IUniversalDataStoreConstants.C_COPY); DataElement cpCmd = getCommandDescriptor(tgtDE, IUniversalDataStoreConstants.C_COPY);
@ -1146,7 +1146,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
// create filter descriptor // create filter descriptor
DataElement deObj = ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, "", "", "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ DataElement deObj = ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, "", "", "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
DataElement[] results = dsQueryCommand(monitor, deObj, IUniversalDataStoreConstants.C_QUERY_ROOTS); DataElement[] results = dsQueryCommand(deObj, IUniversalDataStoreConstants.C_QUERY_ROOTS, monitor);
return convertToHostFiles(results, "*"); //$NON-NLS-1$ return convertToHostFiles(results, "*"); //$NON-NLS-1$
} }
@ -1156,17 +1156,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
public IHostFile[] getFolders(String remoteParent, String fileFilter, IProgressMonitor monitor) public IHostFile[] getFolders(String remoteParent, String fileFilter, IProgressMonitor monitor)
{ {
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS); return fetch(remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS, monitor);
} }
public IHostFile[] getFiles(String remoteParent, String fileFilter, IProgressMonitor monitor) public IHostFile[] getFiles(String remoteParent, String fileFilter, IProgressMonitor monitor)
{ {
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FILES); return fetch(remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FILES, monitor);
} }
public IHostFile[] getFilesAndFolders(String remoteParent, String fileFilter, IProgressMonitor monitor) public IHostFile[] getFilesAndFolders(String remoteParent, String fileFilter, IProgressMonitor monitor)
{ {
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_ALL); return fetch(remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_ALL, monitor);
} }
protected DataElement getElementFor(String path) protected DataElement getElementFor(String path)
@ -1203,7 +1203,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
return (IHostFile)_dstoreFileMap.get(path); return (IHostFile)_dstoreFileMap.get(path);
} }
protected IHostFile[] fetch(IProgressMonitor monitor, String remoteParent, String fileFilter, String queryType) protected IHostFile[] fetch(String remoteParent, String fileFilter, String queryType, IProgressMonitor monitor)
{ {
DataStore ds = getDataStore(); DataStore ds = getDataStore();
@ -1220,7 +1220,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
ArrayList args = new ArrayList(1); ArrayList args = new ArrayList(1);
args.add(attributes); args.add(attributes);
DataElement[] results = dsQueryCommand(monitor, deObj, args, queryType); DataElement[] results = dsQueryCommand(deObj, args, queryType, monitor);
return convertToHostFiles(results, fileFilter); return convertToHostFiles(results, fileFilter);
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.services.dstore; package org.eclipse.rse.services.dstore;
@ -74,7 +74,7 @@ public abstract class AbstractDStoreService implements IDStoreService
return getDataStore().findMinerInformation(id); return getDataStore().findMinerInformation(id);
} }
protected DataElement[] dsQueryCommand(IProgressMonitor monitor, DataElement subject, ArrayList args, String command) protected DataElement[] dsQueryCommand(DataElement subject, ArrayList args, String command, IProgressMonitor monitor)
{ {
// query roots // query roots
DataElement queryCmd = getCommandDescriptor(subject, command); DataElement queryCmd = getCommandDescriptor(subject, command);
@ -112,7 +112,7 @@ public abstract class AbstractDStoreService implements IDStoreService
return new DataElement[0]; return new DataElement[0];
} }
protected DataElement dsStatusCommand(IProgressMonitor monitor, DataElement subject, ArrayList args, String command) protected DataElement dsStatusCommand(DataElement subject, ArrayList args, String command, IProgressMonitor monitor)
{ {
// query roots // query roots
DataElement queryCmd = getCommandDescriptor(subject, command); DataElement queryCmd = getCommandDescriptor(subject, command);
@ -133,7 +133,7 @@ public abstract class AbstractDStoreService implements IDStoreService
return null; return null;
} }
protected DataElement[] dsQueryCommand(IProgressMonitor monitor, DataElement subject, String command) protected DataElement[] dsQueryCommand(DataElement subject, String command, IProgressMonitor monitor)
{ {
// query roots // query roots
DataElement queryCmd = getCommandDescriptor(subject, command); DataElement queryCmd = getCommandDescriptor(subject, command);
@ -161,7 +161,7 @@ public abstract class AbstractDStoreService implements IDStoreService
return new DataElement[0]; return new DataElement[0];
} }
protected DataElement dsStatusCommand(IProgressMonitor monitor, DataElement subject, String command) protected DataElement dsStatusCommand(DataElement subject, String command, IProgressMonitor monitor)
{ {
// query roots // query roots
DataElement queryCmd = getCommandDescriptor(subject, command); DataElement queryCmd = getCommandDescriptor(subject, command);

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.services.dstore.util; package org.eclipse.rse.services.dstore.util;
@ -49,7 +49,7 @@ public class DownloadListener implements IDomainListener
private static String _percentMsg = SystemMessage.sub(SystemMessage.sub(SystemMessage.sub(ServiceResources.DStore_Service_Percent_Complete_Message, "&0", "{0}"), "&1", "{1}"), "&2", "{2}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ private static String _percentMsg = SystemMessage.sub(SystemMessage.sub(SystemMessage.sub(ServiceResources.DStore_Service_Percent_Complete_Message, "&0", "{0}"), "&1", "{1}"), "&2", "{2}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
public DownloadListener(IProgressMonitor monitor, DataElement status, File localFile, String remotePath, long totalLength) public DownloadListener(DataElement status, File localFile, String remotePath, long totalLength, IProgressMonitor monitor)
{ {
_monitor = monitor; _monitor = monitor;
_status = status; _status = status;

View file

@ -886,7 +886,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#rename(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String, org.eclipse.rse.services.files.IHostFile) * @see org.eclipse.rse.services.files.IFileService#rename(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String, org.eclipse.rse.services.files.IHostFile)
*/ */
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) { public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) {
boolean hasSucceeded = false; boolean hasSucceeded = false;
oldFile.renameTo(newName); oldFile.renameTo(newName);

View file

@ -909,7 +909,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
} }
if (fileToDelete.isDirectory()) if (fileToDelete.isDirectory())
{ {
return deleteContents(monitor, fileToDelete); return deleteContents(fileToDelete, monitor);
} }
else else
{ {
@ -917,7 +917,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
} }
} }
private boolean deleteContents(IProgressMonitor monitor, File folder) private boolean deleteContents(File folder, IProgressMonitor monitor)
{ {
boolean result = true; boolean result = true;
File[] files = folder.listFiles(); File[] files = folder.listFiles();
@ -926,7 +926,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
File file = files[i]; File file = files[i];
if (file.isDirectory()) if (file.isDirectory())
{ {
result = deleteContents(monitor, file); result = deleteContents(file, monitor);
} }
else else
{ {
@ -976,7 +976,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
return fileToRename.renameTo(newFile); return fileToRename.renameTo(newFile);
} }
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException
{ {
boolean retVal = rename(remoteParent, oldName, newName, monitor); boolean retVal = rename(remoteParent, oldName, newName, monitor);
File newFile = new File(remoteParent, newName); File newFile = new File(remoteParent, newName);

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.services.local.search; package org.eclipse.rse.internal.services.local.search;
@ -28,7 +28,7 @@ import org.eclipse.rse.services.search.ISearchHandler;
public class LocalSearchService extends AbstractSearchService public class LocalSearchService extends AbstractSearchService
{ {
public ISearchHandler internalSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService) public ISearchHandler internalSearch(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
{ {
LocalSearchHandler handler = new LocalSearchHandler(searchConfig, fileService); LocalSearchHandler handler = new LocalSearchHandler(searchConfig, fileService);
searchConfig.setSearchHandler(handler); searchConfig.setSearchHandler(handler);

View file

@ -657,7 +657,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
//Bug 153649: Recursive directory delete //Bug 153649: Recursive directory delete
//throw new RemoteFolderNotEmptyException(); //throw new RemoteFolderNotEmptyException();
String fullPathQuoted = PathUtility.enQuoteUnix(fullPath); String fullPathQuoted = PathUtility.enQuoteUnix(fullPath);
int rv = runCommand(monitor, "rm -rf "+fullPathQuoted); //$NON-NLS-1$ int rv = runCommand("rm -rf "+fullPathQuoted, monitor); //$NON-NLS-1$
ok = (rv==0); ok = (rv==0);
} else { } else {
throw e; throw e;
@ -698,7 +698,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
return ok; return ok;
} }
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException { public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException {
// TODO dont know how to update // TODO dont know how to update
return rename(remoteParent, oldName, newName, monitor); return rename(remoteParent, oldName, newName, monitor);
} }
@ -712,7 +712,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
return cancelRequested; return cancelRequested;
} }
public int runCommand(IProgressMonitor monitor, String command) throws SystemMessageException public int runCommand(String command, IProgressMonitor monitor) throws SystemMessageException
{ {
Activator.trace("SftpFileService.runCommand "+command); //$NON-NLS-1$ Activator.trace("SftpFileService.runCommand "+command); //$NON-NLS-1$
int result = -1; int result = -1;
@ -776,7 +776,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
Activator.trace("SftpFileService.move "+srcName); //$NON-NLS-1$ Activator.trace("SftpFileService.move "+srcName); //$NON-NLS-1$
String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName); String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName);
String fullPathNew = PathUtility.enQuoteUnix(tgtParent + '/' + tgtName); String fullPathNew = PathUtility.enQuoteUnix(tgtParent + '/' + tgtName);
int rv = runCommand(monitor, "mv "+fullPathOld+' '+fullPathNew); //$NON-NLS-1$ int rv = runCommand("mv "+fullPathOld+' '+fullPathNew, monitor); //$NON-NLS-1$
return (rv==0); return (rv==0);
} }
@ -787,7 +787,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
Activator.trace("SftpFileService.copy "+srcName); //$NON-NLS-1$ Activator.trace("SftpFileService.copy "+srcName); //$NON-NLS-1$
String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName); String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName);
String fullPathNew = PathUtility.enQuoteUnix(tgtParent + '/' + tgtName); String fullPathNew = PathUtility.enQuoteUnix(tgtParent + '/' + tgtName);
int rv = runCommand(monitor, "cp -Rp "+fullPathOld+' '+fullPathNew); //$NON-NLS-1$ int rv = runCommand("cp -Rp "+fullPathOld+' '+fullPathNew, monitor); //$NON-NLS-1$
return (rv==0); return (rv==0);
} }

View file

@ -214,16 +214,16 @@ public interface IFileService extends IService
/** /**
* Renames a file or folder on the host * Renames a file or folder on the host
* @param monitor the progress monitor
* @param remoteParent the folder containing the file to rename * @param remoteParent the folder containing the file to rename
* @param oldName the old name of the file or folder to rename * @param oldName the old name of the file or folder to rename
* @param newName the new name for the file * @param newName the new name for the file
* @param oldFile the file to update with the change * @param oldFile the file to update with the change
* @param monitor the progress monitor
* @return true if successful * @return true if successful
* @throws SystemMessageException if an error occurs. * @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family. * Typically this would be one of those in the RemoteFileException family.
*/ */
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException; public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException;
/** /**
* Move the file or folder specified * Move the file or folder specified

View file

@ -35,7 +35,7 @@ public abstract class AbstractSearchService implements ISearchService
public final void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor) public final void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
{ {
ISearchHandler handler = internalSearch(monitor, searchConfig, fileService); ISearchHandler handler = internalSearch(searchConfig, fileService, monitor);
_searches.put(searchConfig, handler); _searches.put(searchConfig, handler);
} }
@ -47,5 +47,5 @@ public abstract class AbstractSearchService implements ISearchService
} }
protected abstract ISearchHandler internalSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService); protected abstract ISearchHandler internalSearch(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor);
} }

View file

@ -107,7 +107,7 @@ public class SystemCommandAction extends SystemBaseAction
{ {
if (!_ss.isConnected()) if (!_ss.isConnected())
{ {
connect(monitor, (SubSystem)_ss); connect((SubSystem)_ss, monitor);
} }
IRemoteCommandShell cmd = _ss.runShell(_selected, monitor); IRemoteCommandShell cmd = _ss.runShell(_selected, monitor);
Display.getDefault().asyncExec(new UpdateOutputRunnable(_cmdsPart, cmd)); Display.getDefault().asyncExec(new UpdateOutputRunnable(_cmdsPart, cmd));
@ -594,7 +594,7 @@ public class SystemCommandAction extends SystemBaseAction
} }
private boolean connect(IProgressMonitor monitor, SubSystem ss) private boolean connect(SubSystem ss, IProgressMonitor monitor)
{ {
if (!ss.isConnected()) if (!ss.isConnected())
{ {

View file

@ -138,7 +138,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
return file; return file;
} }
IHostFile node = getFile(monitor, parent.getAbsolutePath(), folderOrFileName); IHostFile node = getFile(parent.getAbsolutePath(), folderOrFileName, monitor);
return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node); return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node);
} }
@ -217,7 +217,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$ if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$
String name = fofName.substring(lastSep + 1, fofName.length()); String name = fofName.substring(lastSep + 1, fofName.length());
IHostFile node = getFile(monitor, parentPath, name); IHostFile node = getFile(parentPath, name, monitor);
if (node != null) if (node != null)
{ {
IRemoteFile parent = null; IRemoteFile parent = null;
@ -233,7 +233,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
else else
{ {
AbsoluteVirtualPath avp = new AbsoluteVirtualPath(fofName); AbsoluteVirtualPath avp = new AbsoluteVirtualPath(fofName);
IHostFile node = getFile(null, avp.getPath(), avp.getName()); IHostFile node = getFile(avp.getPath(), avp.getName(), null);
if (node != null) if (node != null)
{ {
return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), null, node); return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), null, node);
@ -278,22 +278,22 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
return root; return root;
} }
protected IHostFile[] getFolders(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException protected IHostFile[] getFolders(String parentPath, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
{ {
return getFileService().getFolders(parentPath, fileNameFilter, monitor); return getFileService().getFolders(parentPath, fileNameFilter, monitor);
} }
protected IHostFile[] getFiles(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException protected IHostFile[] getFiles(String parentPath, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
{ {
return getFileService().getFiles(parentPath, fileNameFilter, monitor); return getFileService().getFiles(parentPath, fileNameFilter, monitor);
} }
protected IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException protected IHostFile[] getFilesAndFolders(String parentPath, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
{ {
return getFileService().getFilesAndFolders(parentPath, fileNameFilter, monitor); return getFileService().getFilesAndFolders(parentPath, fileNameFilter, monitor);
} }
protected IHostFile getFile(IProgressMonitor monitor, String parentPath, String fileName) throws SystemMessageException protected IHostFile getFile(String parentPath, String fileName, IProgressMonitor monitor) throws SystemMessageException
{ {
return getFileService().getFile(parentPath, fileName, monitor); return getFileService().getFile(parentPath, fileName, monitor);
} }
@ -328,7 +328,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
} }
IHostFile[] results = getFilesAndFolders(monitor, parentPath, fileNameFilter); IHostFile[] results = getFilesAndFolders(parentPath, fileNameFilter, monitor);
IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results); IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
if (parent != null) if (parent != null)
@ -362,7 +362,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IHostFile[] results = null; IHostFile[] results = null;
try try
{ {
results = getFiles(monitor, parentPath, fileNameFilter); results = getFiles(parentPath, fileNameFilter, monitor);
} }
catch (SystemMessageException e) catch (SystemMessageException e)
{ {
@ -401,7 +401,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IHostFile[] results = null; IHostFile[] results = null;
try try
{ {
results = getFolders(monitor, parentPath, fileNameFilter); results = getFolders(parentPath, fileNameFilter, monitor);
} }
catch (SystemMessageException e) catch (SystemMessageException e)
{ {

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.subsystems.files.core.subsystems; package org.eclipse.rse.subsystems.files.core.subsystems;
@ -401,18 +402,18 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
/** /**
* Resolves filter strings. * Resolves filter strings.
* The default implementation of this simply calls {@link #internalResolveFilterString(IProgressMonitor, String)}. * The default implementation of this simply calls {@link #internalResolveFilterString(String, IProgressMonitor)}.
* If the result for each filter string is a SystemMessage (e.g. an error), then the messages are returned. * If the result for each filter string is a SystemMessage (e.g. an error), then the messages are returned.
* If the result for any filter string is not a message (i.e. an array of children), then the children are returned, * If the result for any filter string is not a message (i.e. an array of children), then the children are returned,
* and the messages are not. This avoids mixing chuldren as a result of successful resolution of a filter string with * and the messages are not. This avoids mixing chuldren as a result of successful resolution of a filter string with
* messages that might result for other filter strings. * messages that might result for other filter strings.
* So the returned results are always the successful results, or messages (never a mix of the two). * So the returned results are always the successful results, or messages (never a mix of the two).
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterStrings(org.eclipse.core.runtime.IProgressMonitor, java.lang.String[])
* @param monitor the progress monitor we are running under
* @param filterStrings array of filter patterns for objects to return. * @param filterStrings array of filter patterns for objects to return.
* @param monitor the progress monitor we are running under
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterStrings(java.lang.String[], org.eclipse.core.runtime.IProgressMonitor)
* @return Array of objects that are the result of resolving all the filter strings * @return Array of objects that are the result of resolving all the filter strings
*/ */
public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -441,7 +442,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
monitor.setTaskName(getResolvingMessage(filterStrings[idx])); monitor.setTaskName(getResolvingMessage(filterStrings[idx]));
} }
children = internalResolveFilterString(monitor, filterStrings[idx]); children = internalResolveFilterString(filterStrings[idx], monitor);
if (!(children != null && children.length == 1 && children[0] instanceof SystemMessageObject)) { if (!(children != null && children.length == 1 && children[0] instanceof SystemMessageObject)) {
success = true; success = true;
@ -575,9 +576,9 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
/** /**
* Actually resolve an absolute filter string. This is called by the * Actually resolve an absolute filter string. This is called by the
* run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString. * run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(IProgressMonitor,String) * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(String,IProgressMonitor)
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
{ {
boolean debugMode = false; boolean debugMode = false;
IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration(); IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration();
@ -747,7 +748,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
{ {
RemoteFileFilterString fs = null; RemoteFileFilterString fs = null;
try try
@ -773,7 +774,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
{ {
fs = (RemoteFileFilterString) allFilterStrings[idx].clone(); fs = (RemoteFileFilterString) allFilterStrings[idx].clone();
fs.setPath(null); fs.setPath(null);
children = internalResolveOneFilterString(monitor, parent, fs, onlyOne); children = internalResolveOneFilterString(parent, fs, onlyOne, monitor);
if (!onlyOne && (children != null)) if (!onlyOne && (children != null))
{ {
addResolvedFilterStringObjects(vChildren, children, allStrings, idx); addResolvedFilterStringObjects(vChildren, children, allStrings, idx);
@ -803,7 +804,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
{ {
fs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), filterString); fs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), filterString);
} }
return internalResolveOneFilterString(monitor, parent, fs, true); return internalResolveOneFilterString(parent, fs, true, monitor);
} }
catch (SystemMessageException e) catch (SystemMessageException e)
@ -816,7 +817,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
/** /**
* Do one filter string relative resolve * Do one filter string relative resolve
*/ */
protected Object[] internalResolveOneFilterString(IProgressMonitor monitor, Object parent, RemoteFileFilterString fs, boolean sort) protected Object[] internalResolveOneFilterString(Object parent, RemoteFileFilterString fs, boolean sort, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException, SystemMessageException throws InvocationTargetException, InterruptedException, SystemMessageException
{ {
currFilterString = fs; currFilterString = fs;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.subsystems.processes.core.subsystem.impl; package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
@ -114,7 +115,7 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String) * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws InvocationTargetException, throws InvocationTargetException,
InterruptedException InterruptedException
{ {

View file

@ -406,9 +406,9 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
* run(IProgressMonitor monitor) method, which in turn is called by * run(IProgressMonitor monitor) method, which in turn is called by
* resolveFilterString. * resolveFilterString.
* *
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(IProgressMonitor,String) * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(String,IProgressMonitor)
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException throws InvocationTargetException, InterruptedException
{ {
return null; return null;
@ -582,7 +582,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
IRemoteCommandShell cmdShell = (IRemoteCommandShell) command; IRemoteCommandShell cmdShell = (IRemoteCommandShell) command;
if (cmdShell.isActive()) if (cmdShell.isActive())
{ {
internalCancelShell(null, command); internalCancelShell(command, null);
} }
if (_defaultShell == command) if (_defaultShell == command)
{ {
@ -622,7 +622,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
{ {
try try
{ {
IRemoteCommandShell rmtCmd = internalRunShell(null, context); IRemoteCommandShell rmtCmd = internalRunShell(context, null);
results[numShells] = rmtCmd; results[numShells] = rmtCmd;
numShells++; numShells++;
} }
@ -788,7 +788,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
*/ */
public Object[] runCommand(String command, Object context, boolean interpretOutput) throws Exception public Object[] runCommand(String command, Object context, boolean interpretOutput) throws Exception
{ {
return internalRunCommand(null, command, context, interpretOutput); return internalRunCommand(command, context, interpretOutput, null);
} }
/** /**
@ -796,7 +796,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
*/ */
public Object[] runCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor) throws Exception public Object[] runCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor) throws Exception
{ {
return internalRunCommand(monitor, command, context, interpretOutput); return internalRunCommand(command, context, interpretOutput, monitor);
} }
/** /**
@ -809,7 +809,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
IRemoteCommandShell cmdShell = null; IRemoteCommandShell cmdShell = null;
if (isConnected()) if (isConnected())
{ {
cmdShell = internalRunShell(null, context); cmdShell = internalRunShell(context, null);
} }
else else
{ {
@ -827,7 +827,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
*/ */
public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception
{ {
IRemoteCommandShell cmdShell = internalRunShell(monitor, context); IRemoteCommandShell cmdShell = internalRunShell(context, monitor);
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this)); registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this));
@ -884,7 +884,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
Display display = Display.getCurrent(); Display display = Display.getCurrent();
if (display != null) if (display != null)
{ {
internalSendCommandToShell(new NullProgressMonitor(), input, commandObject); internalSendCommandToShell(input, commandObject, new NullProgressMonitor());
} }
else else
{ {
@ -922,7 +922,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
ok = promptForPassword(); ok = promptForPassword();
if (ok) if (ok)
{ {
internalSendCommandToShell(monitor, input, commandObject); internalSendCommandToShell(input, commandObject, monitor);
} }
else else
SystemBasePlugin.logDebugMessage(this.getClass().getName(), SystemBasePlugin.logDebugMessage(this.getClass().getName(),
@ -938,7 +938,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
{ {
if (isConnected()) if (isConnected())
{ {
internalCancelShell(null, commandObject); internalCancelShell(commandObject, null);
} }
else else
{ {
@ -979,7 +979,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
if (ok) if (ok)
{ {
internalCancelShell(monitor, commandObject); internalCancelShell(commandObject, monitor);
} }
else else
{ {
@ -1067,7 +1067,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
if (!implicitConnect(false, mon, msg, totalWorkUnits)) if (!implicitConnect(false, mon, msg, totalWorkUnits))
throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
getHostName()).getLevelOneText()); getHostName()).getLevelOneText());
runOutputs = internalRunCommand(mon, _cmd, _runContext, _runInterpret); runOutputs = internalRunCommand(_cmd, _runContext, _runInterpret, mon);
} }
} }
@ -1101,7 +1101,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
getHostName()).getLevelOneText()); getHostName()).getLevelOneText());
runOutputs = new Object[] runOutputs = new Object[]
{ {
internalRunShell(mon, _runContext) internalRunShell(_runContext, mon)
}; };
} }
} }
@ -1134,7 +1134,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
if (!implicitConnect(false, mon, msg, totalWorkUnits)) if (!implicitConnect(false, mon, msg, totalWorkUnits))
throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
getHostName()).getLevelOneText()); getHostName()).getLevelOneText());
internalCancelShell(mon, _runContext); internalCancelShell(_runContext, mon);
} }
} }
@ -1174,7 +1174,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
if (!implicitConnect(false, mon, msg, totalWorkUnits)) if (!implicitConnect(false, mon, msg, totalWorkUnits))
throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
getHostName()).getLevelOneText()); getHostName()).getLevelOneText());
internalSendCommandToShell(mon, _cmd, _runContext); internalSendCommandToShell(_cmd, _runContext, mon);
} }
} }
@ -1225,7 +1225,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS!
*/ */
protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context) protected Object[] internalRunCommand(String cmd, Object context, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
{ {
return null; return null;
@ -1245,24 +1245,24 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS!
*/ */
protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context, boolean interpretOutput) protected Object[] internalRunCommand(String cmd, Object context, boolean interpretOutput, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException, SystemMessageException throws InvocationTargetException, InterruptedException, SystemMessageException
{ {
return null; return null;
} }
protected IRemoteCommandShell internalRunShell(IProgressMonitor monitor, Object context) protected IRemoteCommandShell internalRunShell(Object context, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException, SystemMessageException throws InvocationTargetException, InterruptedException, SystemMessageException
{ {
return null; return null;
} }
protected void internalCancelShell(IProgressMonitor monitor, Object command) protected void internalCancelShell(Object command, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException throws InvocationTargetException, InterruptedException
{ {
} }
protected void internalSendCommandToShell(IProgressMonitor monitor, String cmd, Object command) protected void internalSendCommandToShell(String cmd, Object command, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException throws InvocationTargetException, InterruptedException
{ {
} }

View file

@ -79,12 +79,12 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
} }
protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context) throws InvocationTargetException, InterruptedException, SystemMessageException protected Object[] internalRunCommand(String cmd, Object context, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, SystemMessageException
{ {
return internalRunCommand(monitor, cmd, context, false); return internalRunCommand(cmd, context, false, monitor);
} }
protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context, boolean interpretOutput) throws InvocationTargetException, InterruptedException, SystemMessageException protected Object[] internalRunCommand(String cmd, Object context, boolean interpretOutput, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, SystemMessageException
{ {
String cwd = ""; //$NON-NLS-1$ String cwd = ""; //$NON-NLS-1$
if (context instanceof IRemoteFile) if (context instanceof IRemoteFile)
@ -121,7 +121,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
return new Object[] {cmdShell}; return new Object[] {cmdShell};
} }
protected IRemoteCommandShell internalRunShell(IProgressMonitor monitor, Object context) throws InvocationTargetException, InterruptedException, SystemMessageException protected IRemoteCommandShell internalRunShell(Object context, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, SystemMessageException
{ {
String cwd = ""; //$NON-NLS-1$ String cwd = ""; //$NON-NLS-1$
if (context instanceof IRemoteFile) if (context instanceof IRemoteFile)
@ -161,7 +161,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
} }
protected void internalCancelShell(IProgressMonitor monitor, Object command) throws InvocationTargetException, InterruptedException protected void internalCancelShell(Object command, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
{ {
if (command instanceof IServiceCommandShell) if (command instanceof IServiceCommandShell)
{ {
@ -170,7 +170,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
} }
} }
protected void internalSendCommandToShell(IProgressMonitor monitor, String cmd, Object command) throws InvocationTargetException, InterruptedException protected void internalSendCommandToShell(String cmd, Object command, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
{ {
if (command instanceof IServiceCommandShell) if (command instanceof IServiceCommandShell)
{ {

View file

@ -111,9 +111,9 @@ public class SystemCopyConnectionAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
IHost oldConnection = (IHost)oldObject; IHost oldConnection = (IHost)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.actions; package org.eclipse.rse.internal.ui.actions;
@ -161,9 +162,9 @@ public class SystemFilterCopyFilterAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
ISystemFilter oldFilter = (ISystemFilter)oldObject; ISystemFilter oldFilter = (ISystemFilter)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.actions; package org.eclipse.rse.internal.ui.actions;
@ -146,9 +147,9 @@ public class SystemFilterCopyFilterPoolAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject; ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.actions; package org.eclipse.rse.internal.ui.actions;
@ -211,9 +212,9 @@ public class SystemFilterCopyFilterStringAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
ISystemFilterString oldFilterString = (ISystemFilterString)oldObject; ISystemFilterString oldFilterString = (ISystemFilterString)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.actions; package org.eclipse.rse.internal.ui.actions;
@ -162,9 +163,9 @@ public class SystemFilterMoveFilterAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
ISystemFilter oldFilter = (ISystemFilter)oldObject; ISystemFilter oldFilter = (ISystemFilter)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.actions; package org.eclipse.rse.internal.ui.actions;
@ -166,9 +167,9 @@ public class SystemFilterMoveFilterPoolAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject; ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.actions; package org.eclipse.rse.internal.ui.actions;
@ -212,9 +213,9 @@ public class SystemFilterMoveFilterStringAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
ISystemFilterString oldFilterString = (ISystemFilterString)oldObject; ISystemFilterString oldFilterString = (ISystemFilterString)oldObject;

View file

@ -116,9 +116,9 @@ public class SystemMoveConnectionAction extends SystemBaseCopyAction
return newName; return newName;
} }
/** /**
* @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String) * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
*/ */
protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception throws Exception
{ {
IHost oldConnection = (IHost)oldObject; IHost oldConnection = (IHost)oldObject;

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -103,7 +104,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
return newSet; return newSet;
} }
protected boolean transferRSEResources(IProgressMonitor monitor, Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter) protected boolean transferRSEResources(Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter, IProgressMonitor monitor)
{ {
@ -277,7 +278,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
return _ok; return _ok;
} }
protected boolean transferRSEResourcesToEclipseResource(IProgressMonitor monitor, IResource target, ISubSystem targetSubSystem) protected boolean transferRSEResourcesToEclipseResource(IResource target, ISubSystem targetSubSystem, IProgressMonitor monitor)
{ {
for (int i = 0; i < _srcObjects.size() && _ok; i++) for (int i = 0; i < _srcObjects.size() && _ok; i++)
{ {
@ -314,7 +315,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
return true; return true;
} }
protected boolean transferNonRSEResources(IProgressMonitor monitor, Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter) protected boolean transferNonRSEResources(Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter, IProgressMonitor monitor)
{ {
for (int i = 0; i < _srcObjects.size() && _ok; i++) for (int i = 0; i < _srcObjects.size() && _ok; i++)
@ -567,16 +568,16 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
if (_sourceType == SRC_TYPE_RSE_RESOURCE) if (_sourceType == SRC_TYPE_RSE_RESOURCE)
{ {
transferRSEResources(monitor, target, targetSubSystem, targetAdapter); transferRSEResources(target, targetSubSystem, targetAdapter, monitor);
} }
else else
{ {
transferNonRSEResources(monitor, target, targetSubSystem, targetAdapter); transferNonRSEResources(target, targetSubSystem, targetAdapter, monitor);
} }
} }
else if (target instanceof IResource) else if (target instanceof IResource)
{ {
transferRSEResourcesToEclipseResource(monitor, (IResource)target, targetSubSystem); transferRSEResourcesToEclipseResource((IResource)target, targetSubSystem, monitor);
} }
} }

View file

@ -246,7 +246,7 @@ public class SystemViewFilterReferenceAdapter
*/ */
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{ {
return internalGetChildren(monitor, element); return internalGetChildren(element, monitor);
} }
/** /**
@ -271,7 +271,7 @@ public class SystemViewFilterReferenceAdapter
* the context is assumed to be modal and, as such, the modal version of ss.resolveFilterStrings * the context is assumed to be modal and, as such, the modal version of ss.resolveFilterStrings
* is called rather than the main thread version. * is called rather than the main thread version.
*/ */
protected synchronized Object[] internalGetChildren(IProgressMonitor monitor, Object element) protected synchronized Object[] internalGetChildren(Object element, IProgressMonitor monitor)
{ {
Object[] children = null; Object[] children = null;
ISystemFilterReference fRef = getFilterReference(element); ISystemFilterReference fRef = getFilterReference(element);

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.ui.actions; package org.eclipse.rse.ui.actions;
@ -310,7 +311,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction
if (newName == null) if (newName == null)
copiedOk = false; copiedOk = false;
else else
copiedOk = doCopy(monitor, targetContainer, oldObject, newName); copiedOk = doCopy(targetContainer, oldObject, newName, monitor);
newNames[idx] = newName; newNames[idx] = newName;
monitor.worked(1); monitor.worked(1);
} }
@ -360,7 +361,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction
/** /**
* DO THE ACTUAL COPY OR MOVE. THIS MUST BE IMPLEMENTED BY CHILD CLASSES * DO THE ACTUAL COPY OR MOVE. THIS MUST BE IMPLEMENTED BY CHILD CLASSES
*/ */
protected abstract boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName) protected abstract boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
throws Exception; throws Exception;
/** /**

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.ui.view; package org.eclipse.rse.ui.view;
@ -115,7 +115,7 @@ public interface ISystemEditableRemoteObject
/** /**
* Open in editor * Open in editor
*/ */
public void open(IProgressMonitor monitor, boolean readOnly); public void open(boolean readOnly, IProgressMonitor monitor);
/** /**
* Set local resource properties * Set local resource properties

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,12 +11,11 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.core.servicesubsystem; package org.eclipse.rse.core.servicesubsystem;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
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;
@ -25,12 +24,8 @@ import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.dialogs.PropertyPage; import org.eclipse.ui.dialogs.PropertyPage;
public abstract class ServiceSubSystem extends SubSystem implements IServiceSubSystem public abstract class ServiceSubSystem extends SubSystem implements IServiceSubSystem
{ {
/** /**
* Constructor * Constructor
* Subclasses must call this via super(). * Subclasses must call this via super().
@ -102,11 +97,10 @@ public abstract class ServiceSubSystem extends SubSystem implements IServiceSubS
* <li>do not worry about calling monitor.done() ... caller will do that! * <li>do not worry about calling monitor.done() ... caller will do that!
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*
* @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter * @param filterString - one of the filter strings from the expanded filter
* @param monitor - the progress monitor in effect while this operation performs
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -146,12 +140,11 @@ public abstract class ServiceSubSystem extends SubSystem implements IServiceSubS
* <li>do not worry about calling monitor.done() ... caller will do that! * <li>do not worry about calling monitor.done() ... caller will do that!
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*
* @param monitor - the progress monitor in effect while this operation performs
* @param parent - the parent resource object being expanded * @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported. * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
* @param monitor - the progress monitor in effect while this operation performs
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {

View file

@ -103,12 +103,12 @@ import org.eclipse.ui.progress.WorkbenchJob;
* These are optional: * These are optional:
* <ul> * <ul>
* <li>{@link #getObjectWithAbsoluteName(String)} * <li>{@link #getObjectWithAbsoluteName(String)}
* <li>{@link #internalResolveFilterString(IProgressMonitor monitor, String filterString)} * <li>{@link #internalResolveFilterString(String filterString, IProgressMonitor monitor)}
* <li>{@link #internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)} * <li>{@link #internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)}
* <li>{@link #internalGetProperty(IProgressMonitor monitor, Object subject, String key)} * <li>{@link #internalGetProperty(Object subject, String key, IProgressMonitor monitor)}
* <li>{@link #internalSetProperty(IProgressMonitor monitor, Object subject, String key, String value)} * <li>{@link #internalSetProperty(Object subject, String key, String value, IProgressMonitor monitor)}
* <li>{@link #internalGetProperties(IProgressMonitor monitor, Object subject, String[] keys)} * <li>{@link #internalGetProperties(Object subject, String[] keys, IProgressMonitor monitor)}
* <li>{@link #internalSetProperties(IProgressMonitor monitor, Object subject, String[] keys, String[] values)} * <li>{@link #internalSetProperties(Object subject, String[] keys, String[] values, IProgressMonitor monitor)}
* </ul> * </ul>
* *
*/ */
@ -1349,7 +1349,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getResolvingMessage(_filterString); msg = getResolvingMessage(_filterString);
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputs = internalResolveFilterString(mon, _filterString); runOutputs = internalResolveFilterString(_filterString, mon);
} }
} }
@ -1380,7 +1380,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getResolvingMessage(_filterString); msg = getResolvingMessage(_filterString);
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputs = internalResolveFilterStrings(mon, _filterStrings); runOutputs = internalResolveFilterStrings(_filterStrings, mon);
} }
} }
@ -1418,7 +1418,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getResolvingMessage(_filterString); msg = getResolvingMessage(_filterString);
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputs = internalResolveFilterString(mon, _parent, _filterString); runOutputs = internalResolveFilterString(_parent, _filterString, mon);
} }
} }
@ -1450,7 +1450,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getQueryingMessage(_key); msg = getQueryingMessage(_key);
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputStrings = new String[] {internalGetProperty(mon, _subject, _key)}; runOutputStrings = new String[] {internalGetProperty(_subject, _key, mon)};
} }
} }
@ -1484,7 +1484,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getSettingMessage(_key); msg = getSettingMessage(_key);
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputs = new Object[] {internalSetProperty(mon, _subject, _key, _value)}; runOutputs = new Object[] {internalSetProperty(_subject, _key, _value, mon)};
} }
} }
@ -1515,7 +1515,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getQueryingMessage(); msg = getQueryingMessage();
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputStrings = internalGetProperties(mon, _subject, _keys); runOutputStrings = internalGetProperties(_subject, _keys, mon);
} }
} }
@ -1550,7 +1550,7 @@ public abstract class SubSystem extends RSEModelObject
msg = getSettingMessage(); msg = getSettingMessage();
if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText()); if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
runOutputs = new Object[] {internalSetProperties(mon, _subject, _keys, _values)}; runOutputs = new Object[] {internalSetProperties(_subject, _keys, _values, mon)};
} }
} }
@ -2054,7 +2054,7 @@ public abstract class SubSystem extends RSEModelObject
ok = promptForPassword(); ok = promptForPassword();
if (ok) if (ok)
{ {
Object[] results = internalResolveFilterString(monitor, filterString); Object[] results = internalResolveFilterString(filterString, monitor);
if (sortResults && (results!=null)) if (sortResults && (results!=null))
results = sortResolvedFilterStringObjects(results); results = sortResolvedFilterStringObjects(results);
return results; return results;
@ -2072,7 +2072,7 @@ public abstract class SubSystem extends RSEModelObject
* This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of * This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of
* filter strings versus a single filter string. * filter strings versus a single filter string.
* <p> * <p>
* The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}. * The default implementation of this simply calls {@link #internalResolveFilterStrings(String[], IProgressMonitor)}.
* <p> * <p>
* After successful resolve, the sort method is called to sort the concatenated results before * After successful resolve, the sort method is called to sort the concatenated results before
* returning them. * returning them.
@ -2094,7 +2094,7 @@ public abstract class SubSystem extends RSEModelObject
ok = promptForPassword(); ok = promptForPassword();
if (ok) if (ok)
{ {
Object[] results = internalResolveFilterStrings(monitor, filterStrings); Object[] results = internalResolveFilterStrings(filterStrings, monitor);
if (sortResults && (results!=null)) if (sortResults && (results!=null))
results = sortResolvedFilterStringObjects(results); results = sortResolvedFilterStringObjects(results);
return results; return results;
@ -2146,7 +2146,7 @@ public abstract class SubSystem extends RSEModelObject
if (ok) if (ok)
{ {
Object[] results= internalResolveFilterString(monitor, parent, filterString); Object[] results= internalResolveFilterString(parent, filterString, monitor);
if (sortResults && (results!=null)) if (sortResults && (results!=null))
results = sortResolvedFilterStringObjects(results); results = sortResolvedFilterStringObjects(results);
return results; return results;
@ -2649,7 +2649,7 @@ public abstract class SubSystem extends RSEModelObject
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -2659,20 +2659,20 @@ public abstract class SubSystem extends RSEModelObject
* Resolve multiple absolute filter strings. This is only applicable if the subsystem * Resolve multiple absolute filter strings. This is only applicable if the subsystem
* factory reports true for supportsFilters(). * factory reports true for supportsFilters().
* <p> * <p>
* This is the same as {@link #internalResolveFilterString(IProgressMonitor, Object, String)} but takes an array of * This is the same as {@link #internalResolveFilterString(Object, String, IProgressMonitor)} but takes an array of
* filter strings versus a single filter string. * filter strings versus a single filter string.
* <p> * <p>
* The default implementation of this simply calls {@link #internalResolveFilterString(IProgressMonitor, String)} * The default implementation of this simply calls {@link #internalResolveFilterString(String, IProgressMonitor)}
* once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject * once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject
* is called on the concatenated result, given subclasses an opportunity to sort the result. * is called on the concatenated result, given subclasses an opportunity to sort the result.
* <p> * <p>
* After successful resolve, the sort method is called to sort the concatenated results before * After successful resolve, the sort method is called to sort the concatenated results before
* returning them. * returning them.
* @param monitor the progress monitor we are running under
* @param filterStrings array of filter patterns for objects to return. * @param filterStrings array of filter patterns for objects to return.
* @param monitor the progress monitor we are running under
* @return Array of objects that are the result of resolving all the filter strings * @return Array of objects that are the result of resolving all the filter strings
*/ */
public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -2684,7 +2684,7 @@ public abstract class SubSystem extends RSEModelObject
{ {
monitor.setTaskName(getResolvingMessage(filterStrings[idx])); monitor.setTaskName(getResolvingMessage(filterStrings[idx]));
} }
children = internalResolveFilterString(monitor, filterStrings[idx]); children = internalResolveFilterString(filterStrings[idx], monitor);
//monitor.worked(1); //monitor.worked(1);
if (children != null) if (children != null)
addResolvedFilterStringObjects(vChildren, children, filterStrings, idx); addResolvedFilterStringObjects(vChildren, children, filterStrings, idx);
@ -2743,7 +2743,7 @@ public abstract class SubSystem extends RSEModelObject
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS! * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -2773,7 +2773,7 @@ public abstract class SubSystem extends RSEModelObject
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES! * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/ */
protected String internalGetProperty(IProgressMonitor monitor, Object subject, String key) protected String internalGetProperty(Object subject, String key, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -2792,7 +2792,7 @@ public abstract class SubSystem extends RSEModelObject
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES! * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/ */
protected Object internalSetProperty(IProgressMonitor monitor, Object subject, String key, String value) protected Object internalSetProperty(Object subject, String key, String value, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -2811,7 +2811,7 @@ public abstract class SubSystem extends RSEModelObject
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES! * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/ */
protected String[] internalGetProperties(IProgressMonitor monitor, Object subject, String[] keys) protected String[] internalGetProperties(Object subject, String[] keys, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {
@ -2830,7 +2830,7 @@ public abstract class SubSystem extends RSEModelObject
* </ul> * </ul>
* YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES! * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
*/ */
protected Object internalSetProperties(IProgressMonitor monitor, Object subject, String[] keys, String[] values) protected Object internalSetProperties(Object subject, String[] keys, String[] values, IProgressMonitor monitor)
throws java.lang.reflect.InvocationTargetException, throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException java.lang.InterruptedException
{ {

View file

@ -8,6 +8,7 @@
* Contributors: * Contributors:
* Tobias Schwarz (Wind River) - initial API and implementation * Tobias Schwarz (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.tests.internal.testsubsystem; package org.eclipse.rse.tests.internal.testsubsystem;
@ -80,7 +81,7 @@ public class TestSubSystem extends SubSystem implements ITestSubSystem {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String) * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws InvocationTargetException, InterruptedException { protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ArrayList filteredChilds = new ArrayList(); ArrayList filteredChilds = new ArrayList();
ITestSubSystemNode[] childs = getChildNodes(); ITestSubSystemNode[] childs = getChildNodes();
for (int i = 0; i < childs.length; i++) { for (int i = 0; i < childs.length; i++) {
@ -95,7 +96,7 @@ public class TestSubSystem extends SubSystem implements ITestSubSystem {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, java.lang.String) * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, java.lang.String)
*/ */
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws InvocationTargetException, InterruptedException { protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ArrayList filteredChilds = new ArrayList(); ArrayList filteredChilds = new ArrayList();
if (parent instanceof ITestSubSystemNodeContainer) { if (parent instanceof ITestSubSystemNodeContainer) {
ITestSubSystemNodeContainer container = (ITestSubSystemNodeContainer)parent; ITestSubSystemNodeContainer container = (ITestSubSystemNodeContainer)parent;