diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html index cd27ebf588f..cd163a8910c 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html @@ -4,7 +4,7 @@ - + DeveloperSubSystem Class After Editing @@ -94,7 +94,7 @@ public class DeveloperSubSystem extends SubSystem * @param monitor - the progress monitor in effect while this operation performs * @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, java.lang.InterruptedException { @@ -125,7 +125,7 @@ public class DeveloperSubSystem extends SubSystem * @param parent - the parent resource object being expanded * @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, java.lang.InterruptedException { diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html index 060d235f5c8..0431b494e0d 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html @@ -4,7 +4,7 @@ - + DeveloperSubSystem Class After Editing Supporting Multiple Filter Types @@ -94,7 +94,7 @@ public class DeveloperSubSystem extends SubSystem * @param monitor - the progress monitor in effect while this operation performs * @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, java.lang.InterruptedException { @@ -156,7 +156,7 @@ public class DeveloperSubSystem extends SubSystem * @param parent - the parent resource object being expanded * @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, java.lang.InterruptedException { diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java index 8b24f2b07d6..6971e6cff89 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java +++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java @@ -12,7 +12,6 @@ * * Contributors: * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE. - * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation ********************************************************************************/ 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. * Using the criteria of the filter string, it must return objects representing remote resources. * 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 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, 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 * the resource's adapter states the resource object is expandable.
* 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 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, java.lang.InterruptedException { diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java index 2963790a1bd..f394ec0c74d 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java @@ -13,7 +13,8 @@ * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies * 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; @@ -533,7 +534,7 @@ public class DStoreConnectorService extends StandardConnectorService implements if (autoDetectSSL) timeout = 3000; else setSSLProperties(isUsingSSL()); - int iServerPort = launchUsingRexec(monitor, info, serverLauncher); + int iServerPort = launchUsingRexec(info, serverLauncher, monitor); if(iServerPort != 0) { @@ -552,7 +553,7 @@ public class DStoreConnectorService extends StandardConnectorService implements { if (setSSLProperties(true)) { - iServerPort = launchUsingRexec(monitor, info, serverLauncher); + iServerPort = launchUsingRexec(info, serverLauncher, monitor); if (iServerPort != 0) { 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(); starter.setSignonInformation(info); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java index 1d47aaade12..3722f33916e 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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. * * 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; @@ -41,8 +41,6 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; import org.eclipse.swt.widgets.Composite; - - public class SystemCompareInput extends CompareEditorInput { @@ -208,7 +206,7 @@ public class SystemCompareInput extends CompareEditorInput { try { - commit(pm, (DiffNode) fRoot); + commit((DiffNode) fRoot, pm); } finally { @@ -223,7 +221,7 @@ public class SystemCompareInput extends CompareEditorInput /* * 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) ((MyDiffNode) node).clearDirty(); @@ -243,7 +241,7 @@ public class SystemCompareInput extends CompareEditorInput { IDiffElement element = children[i]; if (element instanceof DiffNode) - commit(pm, (DiffNode) element); + commit((DiffNode) element, pm); } } } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java index d6be13b5e17..1bbc7b94a75 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java @@ -15,6 +15,7 @@ * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * 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; @@ -1165,13 +1166,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP */ public void open(IProgressMonitor monitor) { - open(monitor, false); + open(false, monitor); } /** * Open in editor */ - public void open(IProgressMonitor monitor, boolean readOnly) + public void open(boolean readOnly, IProgressMonitor monitor) { try diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java index 0141575393b..e6a0ce1d180 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * 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; @@ -54,7 +55,6 @@ import org.eclipse.rse.ui.validators.IValidatorRemoteSelection; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.swt.widgets.Shell; - /** * 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 oldObject will be the IRemoteFile object currently being copied * @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 { targetFolder = (IRemoteFile)targetContainer; @@ -270,7 +270,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction { IRemoteFile child = children[i]; monitor.subTask("copying " + child.getName()); //$NON-NLS-1$ - doCopy(monitor, newTargetFolder, child, child.getName()); + doCopy(newTargetFolder, child, child.getName(), monitor); monitor.worked(1); } } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java index 5913366006b..1642eafedda 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -32,7 +33,6 @@ import org.eclipse.rse.ui.validators.IValidatorRemoteSelection; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.swt.widgets.Shell; - /** * 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 oldObject will be the IRemoteFile object currently being moved * @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 { IRemoteFile targetFolder = (IRemoteFile)targetContainer; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index 17e9321fc3a..e96f9c44cc9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -18,6 +18,7 @@ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * 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; @@ -145,7 +146,6 @@ import org.eclipse.ui.progress.IElementCollector; import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor; - /** * Adapter for displaying remote file system objects in tree views. * These are children of RemoteFileSubSystem filter strings @@ -583,7 +583,7 @@ public class SystemViewRemoteFileAdapter */ 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) { - 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); IRemoteFile file = (IRemoteFile) element; @@ -1822,7 +1822,7 @@ public class SystemViewRemoteFileAdapter Object[] children = null; try { - children = ((SubSystem)srcSubSystem).internalResolveFilterStrings(monitor, filterReference.getReferencedFilter().getFilterStrings()); + children = ((SubSystem)srcSubSystem).internalResolveFilterStrings(filterReference.getReferencedFilter().getFilterStrings(), monitor); } catch (Exception e) { @@ -2110,7 +2110,7 @@ public class SystemViewRemoteFileAdapter Object[] children = null; try { - children = filterSubSystem.internalResolveFilterStrings(monitor, filterReference.getReferencedFilter().getFilterStrings()); + children = filterSubSystem.internalResolveFilterStrings(filterReference.getReferencedFilter().getFilterStrings(), monitor); } catch (Exception e) { diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java index 482976fbfbd..0fc2bfe25a8 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -49,7 +50,6 @@ import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.model.ISystemRegistryUI; import org.eclipse.swt.widgets.Shell; - 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)) signalType = ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT; monitor.subTask(getKillingMessage(signalType, currentProcess.getName()).getLevelOneText()); - killedOk = doKill(monitor, signalType, currentProcess); + killedOk = doKill(currentProcess, signalType, monitor); monitor.worked(1); } monitor.done(); @@ -203,11 +203,11 @@ public class SystemKillProcessAction extends SystemBaseDialogAction implements I } /** + * @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 - * @param signal the signal to be sent to the remote process - * @param process the process to send the signal to */ - protected boolean doKill(IProgressMonitor monitor, String signal, IRemoteProcess process) + protected boolean doKill(IRemoteProcess process, String signal, IProgressMonitor monitor) throws Exception { diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java index 75fdc253fb3..59a8224dab5 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java @@ -636,7 +636,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer } try { - DownloadListener dlistener = new DownloadListener(monitor, status, localFile, remotePath, fileLength); + DownloadListener dlistener = new DownloadListener(status, localFile, remotePath, fileLength, monitor); try { dlistener.waitForUpdate(); @@ -729,7 +729,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer buf.append(name); 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); } @@ -831,7 +831,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer 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 (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) @@ -851,7 +851,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer String remotePath = remoteParent + getSeparator(remoteParent) + folderName; 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 (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) @@ -871,7 +871,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer { String remotePath = remoteParent + getSeparator(remoteParent) + fileName; 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 (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)) { @@ -896,7 +896,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer DataElement de = getElementFor(remotePath); 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 (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED)) 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); 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 (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); String newPath = remoteParent + getSeparator(remoteParent) + newName; @@ -1051,7 +1051,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer DataElement tgtDE = getElementFor(tgtParent); 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); @@ -1146,7 +1146,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer // create filter descriptor 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$ } @@ -1156,17 +1156,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer 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) { - 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) { - 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) @@ -1203,7 +1203,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer 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(); @@ -1220,7 +1220,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer ArrayList args = new ArrayList(1); args.add(attributes); - DataElement[] results = dsQueryCommand(monitor, deObj, args, queryType); + DataElement[] results = dsQueryCommand(deObj, args, queryType, monitor); return convertToHostFiles(results, fileFilter); } diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java index de8d35f3023..3ef95125143 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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. * * 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; @@ -74,7 +74,7 @@ public abstract class AbstractDStoreService implements IDStoreService 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 DataElement queryCmd = getCommandDescriptor(subject, command); @@ -112,7 +112,7 @@ public abstract class AbstractDStoreService implements IDStoreService 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 DataElement queryCmd = getCommandDescriptor(subject, command); @@ -133,7 +133,7 @@ public abstract class AbstractDStoreService implements IDStoreService return null; } - protected DataElement[] dsQueryCommand(IProgressMonitor monitor, DataElement subject, String command) + protected DataElement[] dsQueryCommand(DataElement subject, String command, IProgressMonitor monitor) { // query roots DataElement queryCmd = getCommandDescriptor(subject, command); @@ -161,7 +161,7 @@ public abstract class AbstractDStoreService implements IDStoreService return new DataElement[0]; } - protected DataElement dsStatusCommand(IProgressMonitor monitor, DataElement subject, String command) + protected DataElement dsStatusCommand(DataElement subject, String command, IProgressMonitor monitor) { // query roots DataElement queryCmd = getCommandDescriptor(subject, command); diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java index 94b42ae5864..5f51fad6d8a 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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. * * 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; @@ -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$ - 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; _status = status; diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java index ec4f1b48332..6dd6b81bc81 100644 --- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java +++ b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java @@ -886,7 +886,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT /* (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) */ - 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; oldFile.renameTo(newName); diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java index 651b998db33..c6be4ece366 100644 --- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java +++ b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java @@ -909,7 +909,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic } if (fileToDelete.isDirectory()) { - return deleteContents(monitor, fileToDelete); + return deleteContents(fileToDelete, monitor); } 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; File[] files = folder.listFiles(); @@ -926,7 +926,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic File file = files[i]; if (file.isDirectory()) { - result = deleteContents(monitor, file); + result = deleteContents(file, monitor); } else { @@ -976,7 +976,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic 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); File newFile = new File(remoteParent, newName); diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java index 39e7dc2e964..56cd31bcd3a 100644 --- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java +++ b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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. * * 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; @@ -28,7 +28,7 @@ import org.eclipse.rse.services.search.ISearchHandler; 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); searchConfig.setSearchHandler(handler); diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java index 4c8607f41c0..348dec745df 100644 --- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java +++ b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java @@ -657,7 +657,7 @@ public class SftpFileService extends AbstractFileService implements IFileService //Bug 153649: Recursive directory delete //throw new RemoteFolderNotEmptyException(); 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); } else { throw e; @@ -698,7 +698,7 @@ public class SftpFileService extends AbstractFileService implements IFileService 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 return rename(remoteParent, oldName, newName, monitor); } @@ -712,7 +712,7 @@ public class SftpFileService extends AbstractFileService implements IFileService 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$ int result = -1; @@ -776,7 +776,7 @@ public class SftpFileService extends AbstractFileService implements IFileService Activator.trace("SftpFileService.move "+srcName); //$NON-NLS-1$ String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName); 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); } @@ -787,7 +787,7 @@ public class SftpFileService extends AbstractFileService implements IFileService Activator.trace("SftpFileService.copy "+srcName); //$NON-NLS-1$ String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName); 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); } diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java index c97b6784a95..55bbf157b72 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java @@ -214,16 +214,16 @@ public interface IFileService extends IService /** * Renames a file or folder on the host - * @param monitor the progress monitor * @param remoteParent the folder containing the file to rename * @param oldName the old name of the file or folder to rename * @param newName the new name for the file * @param oldFile the file to update with the change + * @param monitor the progress monitor * @return true if successful * @throws SystemMessageException if an error occurs. * 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 diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java index 0d6a4fa713c..486bf42816b 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java @@ -35,7 +35,7 @@ public abstract class AbstractSearchService implements ISearchService 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); } @@ -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); } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java index 6e017ec4443..fb6770473f5 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java @@ -107,7 +107,7 @@ public class SystemCommandAction extends SystemBaseAction { if (!_ss.isConnected()) { - connect(monitor, (SubSystem)_ss); + connect((SubSystem)_ss, monitor); } IRemoteCommandShell cmd = _ss.runShell(_selected, monitor); 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()) { diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java index d00cfda85f8..6d7e7e90a59 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java @@ -138,7 +138,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I return file; } - IHostFile node = getFile(monitor, parent.getAbsolutePath(), folderOrFileName); + IHostFile node = getFile(parent.getAbsolutePath(), folderOrFileName, monitor); 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$ String name = fofName.substring(lastSep + 1, fofName.length()); - IHostFile node = getFile(monitor, parentPath, name); + IHostFile node = getFile(parentPath, name, monitor); if (node != null) { IRemoteFile parent = null; @@ -233,7 +233,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I else { AbsoluteVirtualPath avp = new AbsoluteVirtualPath(fofName); - IHostFile node = getFile(null, avp.getPath(), avp.getName()); + IHostFile node = getFile(avp.getPath(), avp.getName(), null); if (node != null) { return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), null, node); @@ -278,22 +278,22 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I 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); } - 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); } - 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); } - 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); } @@ -328,7 +328,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I throw new SystemMessageException(msg); } - IHostFile[] results = getFilesAndFolders(monitor, parentPath, fileNameFilter); + IHostFile[] results = getFilesAndFolders(parentPath, fileNameFilter, monitor); IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results); if (parent != null) @@ -362,7 +362,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I IHostFile[] results = null; try { - results = getFiles(monitor, parentPath, fileNameFilter); + results = getFiles(parentPath, fileNameFilter, monitor); } catch (SystemMessageException e) { @@ -401,7 +401,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I IHostFile[] results = null; try { - results = getFolders(monitor, parentPath, fileNameFilter); + results = getFolders(parentPath, fileNameFilter, monitor); } catch (SystemMessageException e) { diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java index eedef0b659a..3b8b14cecc8 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java @@ -16,6 +16,7 @@ * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * 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; @@ -401,18 +402,18 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi /** * 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 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 * 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). - * @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 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 */ - public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) + public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException { @@ -441,7 +442,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi 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)) { 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 * 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; IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration(); @@ -747,7 +748,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi * * 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; try @@ -773,7 +774,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi { fs = (RemoteFileFilterString) allFilterStrings[idx].clone(); fs.setPath(null); - children = internalResolveOneFilterString(monitor, parent, fs, onlyOne); + children = internalResolveOneFilterString(parent, fs, onlyOne, monitor); if (!onlyOne && (children != null)) { addResolvedFilterStringObjects(vChildren, children, allStrings, idx); @@ -803,7 +804,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi { fs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), filterString); } - return internalResolveOneFilterString(monitor, parent, fs, true); + return internalResolveOneFilterString(parent, fs, true, monitor); } catch (SystemMessageException e) @@ -816,7 +817,7 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi /** * 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 { currFilterString = fs; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java index e50d6152cff..a68bb46be33 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -114,7 +115,7 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements /* (non-Javadoc) * @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, InterruptedException { diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java index 55f5a21ded1..07d187d7b53 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java @@ -406,9 +406,9 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd * 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) + protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { return null; @@ -582,7 +582,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd IRemoteCommandShell cmdShell = (IRemoteCommandShell) command; if (cmdShell.isActive()) { - internalCancelShell(null, command); + internalCancelShell(command, null); } if (_defaultShell == command) { @@ -622,7 +622,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd { try { - IRemoteCommandShell rmtCmd = internalRunShell(null, context); + IRemoteCommandShell rmtCmd = internalRunShell(context, null); results[numShells] = rmtCmd; numShells++; } @@ -788,7 +788,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd */ 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 { - 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; if (isConnected()) { - cmdShell = internalRunShell(null, context); + cmdShell = internalRunShell(context, null); } else { @@ -827,7 +827,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd */ public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception { - IRemoteCommandShell cmdShell = internalRunShell(monitor, context); + IRemoteCommandShell cmdShell = internalRunShell(context, monitor); ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); 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(); if (display != null) { - internalSendCommandToShell(new NullProgressMonitor(), input, commandObject); + internalSendCommandToShell(input, commandObject, new NullProgressMonitor()); } else { @@ -922,7 +922,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd ok = promptForPassword(); if (ok) { - internalSendCommandToShell(monitor, input, commandObject); + internalSendCommandToShell(input, commandObject, monitor); } else SystemBasePlugin.logDebugMessage(this.getClass().getName(), @@ -938,7 +938,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd { if (isConnected()) { - internalCancelShell(null, commandObject); + internalCancelShell(commandObject, null); } else { @@ -979,7 +979,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd if (ok) { - internalCancelShell(monitor, commandObject); + internalCancelShell(commandObject, monitor); } else { @@ -1067,7 +1067,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( 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()); 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)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( 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)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( getHostName()).getLevelOneText()); - internalSendCommandToShell(mon, _cmd, _runContext); + internalSendCommandToShell(_cmd, _runContext, mon); } } @@ -1225,7 +1225,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd * * 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 { return null; @@ -1245,24 +1245,24 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd * * 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 { return null; } - protected IRemoteCommandShell internalRunShell(IProgressMonitor monitor, Object context) + protected IRemoteCommandShell internalRunShell(Object context, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, SystemMessageException { return null; } - protected void internalCancelShell(IProgressMonitor monitor, Object command) + protected void internalCancelShell(Object command, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { } - protected void internalSendCommandToShell(IProgressMonitor monitor, String cmd, Object command) + protected void internalSendCommandToShell(String cmd, Object command, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java index 859c2badb3f..9020b5e530f 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java @@ -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$ if (context instanceof IRemoteFile) @@ -121,7 +121,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I 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$ 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) { @@ -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) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java index 2d0b5d75d97..52c93a13146 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java @@ -111,9 +111,9 @@ public class SystemCopyConnectionAction extends SystemBaseCopyAction 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 { IHost oldConnection = (IHost)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java index 09d67b5b501..af304fc3da7 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -161,9 +162,9 @@ public class SystemFilterCopyFilterAction extends SystemBaseCopyAction 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 { ISystemFilter oldFilter = (ISystemFilter)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java index 612d15e35a5..5a039d1d7cf 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -146,9 +147,9 @@ public class SystemFilterCopyFilterPoolAction extends SystemBaseCopyAction 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 { ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java index 7afc4720b38..244c77d5871 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -211,9 +212,9 @@ public class SystemFilterCopyFilterStringAction extends SystemBaseCopyAction 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 { ISystemFilterString oldFilterString = (ISystemFilterString)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java index 1c8b79aeb31..0f205b6e4bb 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -162,9 +163,9 @@ public class SystemFilterMoveFilterAction extends SystemBaseCopyAction 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 { ISystemFilter oldFilter = (ISystemFilter)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java index 7d6ccb1034a..85adeb443ee 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -166,9 +167,9 @@ public class SystemFilterMoveFilterPoolAction extends SystemBaseCopyAction 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 { ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java index 85f819d7cb0..e0d6b9926c9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -212,9 +213,9 @@ public class SystemFilterMoveFilterStringAction extends SystemBaseCopyAction 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 { ISystemFilterString oldFilterString = (ISystemFilterString)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java index 86fefae731d..4d571be1124 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java @@ -116,9 +116,9 @@ public class SystemMoveConnectionAction extends SystemBaseCopyAction 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 { IHost oldConnection = (IHost)oldObject; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java index 37c58aafd09..43b3a21ce88 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -103,7 +104,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob 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; } - 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++) { @@ -314,7 +315,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob 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++) @@ -567,16 +568,16 @@ public class SystemDNDTransferRunnable extends WorkspaceJob if (_sourceType == SRC_TYPE_RSE_RESOURCE) { - transferRSEResources(monitor, target, targetSubSystem, targetAdapter); + transferRSEResources(target, targetSubSystem, targetAdapter, monitor); } else { - transferNonRSEResources(monitor, target, targetSubSystem, targetAdapter); + transferNonRSEResources(target, targetSubSystem, targetAdapter, monitor); } } else if (target instanceof IResource) { - transferRSEResourcesToEclipseResource(monitor, (IResource)target, targetSubSystem); + transferRSEResourcesToEclipseResource((IResource)target, targetSubSystem, monitor); } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java index 9865486654e..c43d01e4362 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java @@ -246,7 +246,7 @@ public class SystemViewFilterReferenceAdapter */ 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 * 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; ISystemFilterReference fRef = getFilterReference(element); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java index 2223a84412c..da1deb40f1c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java @@ -12,6 +12,7 @@ * * Contributors: * 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; @@ -310,7 +311,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction if (newName == null) copiedOk = false; else - copiedOk = doCopy(monitor, targetContainer, oldObject, newName); + copiedOk = doCopy(targetContainer, oldObject, newName, monitor); newNames[idx] = newName; 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 */ - 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; /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java index 5365b57f6e5..e0584315889 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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. * * 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; @@ -115,7 +115,7 @@ public interface ISystemEditableRemoteObject /** * Open in editor */ - public void open(IProgressMonitor monitor, boolean readOnly); + public void open(boolean readOnly, IProgressMonitor monitor); /** * Set local resource properties diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java index 56788c600f2..82f14871bd9 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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. * * 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; - import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.core.model.IHost; 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.ui.dialogs.PropertyPage; - - - public abstract class ServiceSubSystem extends SubSystem implements IServiceSubSystem { - /** * Constructor * Subclasses must call this via super(). @@ -102,11 +97,10 @@ public abstract class ServiceSubSystem extends SubSystem implements IServiceSubS *
  • do not worry about calling monitor.done() ... caller will do that! * * 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 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, java.lang.InterruptedException { @@ -146,12 +140,11 @@ public abstract class ServiceSubSystem extends SubSystem implements IServiceSubS *
  • do not worry about calling monitor.done() ... caller will do that! * * 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 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, java.lang.InterruptedException { diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java index ccbd7e9c8e3..490ca5aa834 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java @@ -103,12 +103,12 @@ import org.eclipse.ui.progress.WorkbenchJob; * These are optional: * * */ @@ -1349,7 +1349,7 @@ public abstract class SubSystem extends RSEModelObject msg = getResolvingMessage(_filterString); 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); 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); 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); 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); 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(); 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(); 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(); if (ok) { - Object[] results = internalResolveFilterString(monitor, filterString); + Object[] results = internalResolveFilterString(filterString, monitor); if (sortResults && (results!=null)) results = sortResolvedFilterStringObjects(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 * filter strings versus a single filter string. *

    - * The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}. + * The default implementation of this simply calls {@link #internalResolveFilterStrings(String[], IProgressMonitor)}. *

    * After successful resolve, the sort method is called to sort the concatenated results before * returning them. @@ -2094,7 +2094,7 @@ public abstract class SubSystem extends RSEModelObject ok = promptForPassword(); if (ok) { - Object[] results = internalResolveFilterStrings(monitor, filterStrings); + Object[] results = internalResolveFilterStrings(filterStrings, monitor); if (sortResults && (results!=null)) results = sortResolvedFilterStringObjects(results); return results; @@ -2146,7 +2146,7 @@ public abstract class SubSystem extends RSEModelObject if (ok) { - Object[] results= internalResolveFilterString(monitor, parent, filterString); + Object[] results= internalResolveFilterString(parent, filterString, monitor); if (sortResults && (results!=null)) results = sortResolvedFilterStringObjects(results); return results; @@ -2649,7 +2649,7 @@ public abstract class SubSystem extends RSEModelObject * * 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, 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 * factory reports true for supportsFilters(). *

    - * 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. *

    - * 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 * is called on the concatenated result, given subclasses an opportunity to sort the result. *

    * After successful resolve, the sort method is called to sort the concatenated results before * returning them. - * @param monitor the progress monitor we are running under * @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 */ - public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) + public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException { @@ -2684,7 +2684,7 @@ public abstract class SubSystem extends RSEModelObject { monitor.setTaskName(getResolvingMessage(filterStrings[idx])); } - children = internalResolveFilterString(monitor, filterStrings[idx]); + children = internalResolveFilterString(filterStrings[idx], monitor); //monitor.worked(1); if (children != null) addResolvedFilterStringObjects(vChildren, children, filterStrings, idx); @@ -2743,7 +2743,7 @@ public abstract class SubSystem extends RSEModelObject * * 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, java.lang.InterruptedException { @@ -2773,7 +2773,7 @@ public abstract class SubSystem extends RSEModelObject * * 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, java.lang.InterruptedException { @@ -2792,7 +2792,7 @@ public abstract class SubSystem extends RSEModelObject * * 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, java.lang.InterruptedException { @@ -2811,7 +2811,7 @@ public abstract class SubSystem extends RSEModelObject * * 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, java.lang.InterruptedException { @@ -2830,7 +2830,7 @@ public abstract class SubSystem extends RSEModelObject * * 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, java.lang.InterruptedException { diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java index 5bd1f62fbc7..5e93768f3c6 100644 --- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java +++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java @@ -8,6 +8,7 @@ * Contributors: * Tobias Schwarz (Wind River) - initial API and implementation * 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; @@ -80,7 +81,7 @@ public class TestSubSystem extends SubSystem implements ITestSubSystem { /* (non-Javadoc) * @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(); ITestSubSystemNode[] childs = getChildNodes(); for (int i = 0; i < childs.length; i++) { @@ -95,7 +96,7 @@ public class TestSubSystem extends SubSystem implements ITestSubSystem { /* (non-Javadoc) * @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(); if (parent instanceof ITestSubSystemNodeContainer) { ITestSubSystemNodeContainer container = (ITestSubSystemNodeContainer)parent;