diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java
index 043fd5d8a59..bc5b48edddc 100644
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java
+++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - adapted template for daytime example.
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.examples.daytime.model;
@@ -73,7 +74,7 @@ public class DaytimeResourceAdapter extends AbstractSystemViewAdapter implements
return false;
}
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
return null;
}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java
index b9c923669ca..72388f1acad 100644
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java
+++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package samples.model;
@@ -103,7 +104,7 @@ public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
}
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
return null;
}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java
index 9c6b7a75bd6..b616675afa9 100644
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java
+++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package samples.model;
@@ -104,7 +105,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
/* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
return ((TeamResource)element).getDevelopers();
}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java
index d36d7e49a87..a78837625d4 100644
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java
+++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.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
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package samples.ui.actions;
@@ -141,7 +142,7 @@ public class ShowJarContents implements IObjectActionDelegate
environment[0] = "AAA=BBB"; //$NON-NLS-1$
String initialWorkingDirectory = "."; //$NON-NLS-1$
- IHostShell hostShell = shellService.launchShell(new NullProgressMonitor(), initialWorkingDirectory, environment);
+ IHostShell hostShell = shellService.launchShell(initialWorkingDirectory, environment, new NullProgressMonitor());
hostShell.addOutputListener(new StdOutOutputListener());
//hostShell.writeToShell("pwd"); //$NON-NLS-1$
//hostShell.writeToShell("echo ${AAA}"); //$NON-NLS-1$
@@ -155,7 +156,7 @@ public class ShowJarContents implements IObjectActionDelegate
public void runCommandInvisibly(IRemoteCmdSubSystem cmdss, String command) throws Exception
{
command = command + cmdss.getParentRemoteCmdSubSystemConfiguration().getCommandSeparator() + "exit"; //$NON-NLS-1$
- Object[] result = cmdss.runCommand(new NullProgressMonitor(), command, null, false);
+ Object[] result = cmdss.runCommand(command, null, false, new NullProgressMonitor());
if (result.length>0 && result[0] instanceof IRemoteCommandShell) {
IRemoteCommandShell cs = (IRemoteCommandShell)result[0];
while (cs.isActive()) {
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java
index d464cdb4563..e49e7c5a38e 100644
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java
+++ b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
+ * Copyright (c) 2006, 2007 PalmSource, Inc. 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Ewa Matejska (PalmSource) - Adapted from LocalRunLaunchDelegate
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
@@ -218,7 +219,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
{
public void run()
{ try {
- subsystem.connect(false);
+ subsystem.connect(false, null);
} catch (Exception e) {
// Ignore
}
@@ -247,8 +248,8 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
File file = new File(localExePath);
Path remotePath = new Path(remoteExePath);
try {
- fileService.upload(new NullProgressMonitor(), file, remotePath.removeLastSegments(1).toString(),
- remotePath.lastSegment(), true, null, null);
+ fileService.upload(file, remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(),
+ true, null, null, new NullProgressMonitor());
// Need to change the permissions to match the original file permissions because of a bug in upload
Process p = remoteShellExec(config, "chmod", "+x " + spaceEscapify(remotePath.toString())); //$NON-NLS-1$ //$NON-NLS-2$
Thread.sleep(500);
@@ -277,7 +278,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
// This is necessary because runCommand does not actually run the command right now.
String env[] = new String[0];
- IHostShell hostShell = shellService.launchShell(new NullProgressMonitor(), "",env); //$NON-NLS-1$
+ IHostShell hostShell = shellService.launchShell("", env,new NullProgressMonitor()); //$NON-NLS-1$
hostShell.writeToShell(remote_command);
Process p = null;
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java
index 9ea3efe08db..105aa904d15 100644
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java
+++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.connectorservice.dstore;
@@ -822,12 +822,12 @@ public class RexecDstoreServer implements IServerLauncher
/**
* Connect to the remote server.
- * @see #getErrorMessage()
- * @param monitor a monitor for showing progress
* @param connectPort the port to use for launching the server
+ * @param monitor a monitor for showing progress
+ * @see #getErrorMessage()
* @return Anything you want.
*/
- public Object connect(IProgressMonitor monitor, int connectPort) throws Exception
+ public Object connect(int connectPort, IProgressMonitor monitor) throws Exception
{
clientConnection.setPort(Integer.toString(connectPort));
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
index 770f7dba08a..c5d5cd5277e 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.core.model;
@@ -221,13 +222,13 @@ public interface ISystemRegistry extends ISchedulingRule {
/**
* Copy a SystemProfile. All connections connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
* @param profile Source profile to copy
* @param newName Unique name to give copied profile
* @param makeActive whether to make the copied profile active or not
+ * @param monitor Progress monitor to reflect each step of the operation
* @return new SystemProfile object
*/
- public ISystemProfile copySystemProfile(IProgressMonitor monitor, ISystemProfile profile, String newName, boolean makeActive) throws Exception;
+ public ISystemProfile copySystemProfile(ISystemProfile profile, String newName, boolean makeActive, IProgressMonitor monitor) throws Exception;
/**
* Rename a SystemProfile. Rename is propogated to all subsystem factories so
@@ -649,27 +650,27 @@ public interface ISystemRegistry extends ISchedulingRule {
/**
* Copy a SystemConnection. All subsystems are copied, and all connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
* @param conn The connection to copy
* @param targetProfile What profile to copy into
* @param newName Unique name to give copied profile
+ * @param monitor Progress monitor to reflect each step of the operation
* @return new SystemConnection object
*/
- public IHost copyHost(IProgressMonitor monitor, IHost conn, ISystemProfile targetProfile, String newName) throws Exception;
+ public IHost copyHost(IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor) throws Exception;
/**
* Move a SystemConnection to another profile.
* All subsystems are moved, and all connection data is moved.
* This is actually accomplished by doing a copy operation first,
* and if successful deleting the original.
- * @param monitor Progress monitor to reflect each step of the operation
* @param conn The connection to move
* @param targetProfile What profile to move into
* @param newName Unique name to give copied profile. Typically this is the same as the original name, but
* will be different on name collisions
+ * @param monitor Progress monitor to reflect each step of the operation
* @return new SystemConnection object
*/
- public IHost moveHost(IProgressMonitor monitor, IHost conn, ISystemProfile targetProfile, String newName) throws Exception;
+ public IHost moveHost(IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor) throws Exception;
/**
* Return true if any subsystem supports connecting.
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java
index 60293c65889..f1ebc60eda4 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -74,12 +74,12 @@ public interface IServerLauncher {
/**
* Connect to the remote server.
- * @see #getErrorMessage()
- * @param monitor a monitor for showing progress
* @param connectPort the port to use for launching the server
+ * @param monitor a monitor for showing progress
+ * @see #getErrorMessage()
* @return Anything you want.
*/
- public Object connect(IProgressMonitor monitor, int connectPort) throws Exception;
+ public Object connect(int connectPort, IProgressMonitor monitor) throws Exception;
/**
* Disconnect from the remote server
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
index 5bb3a424eb7..c1322228926 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.core.subsystems;
@@ -362,60 +363,37 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
*/
public void connect() throws Exception;
-
/**
- * Connect to the remote system, optionally forcing a signon prompt even if the password
- * is cached in memory or on disk.
+ * Synchronously connect to the remote system.
*
- * @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
- * in memory.
+ * Clients are expected to call this method on a background
+ * thread with an existing progress monitor. A signon prompt
+ * may optionally be forced even if the password is cached
+ * in memory or on disk.
*
- * @deprecated use {@link #connect(IProgressMonitor, boolean)}
- */
- public void connect(boolean forcePrompt) throws Exception;
-
-
- /**
- * Connect to the remote system from a background job
+ * The framework will take care of switching to the UI thread
+ * for requesting a password from the user if necessary.
*
- * @param monitor the process monitor. Must not be null
.
- *
- * @deprecated use {@link #connect(IProgressMonitor, boolean)}
- */
- public void connect(IProgressMonitor monitor) throws Exception;
-
- /**
- * Connect to the remote system from a background job
- *
- * @param monitor the process monitor. Must not be null
.
+ * @param monitor the progress monitor. Must not be null
.
* @param forcePrompt forces the prompt dialog to be displayed
* even if the password is currently in memory.
*/
public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception;
-
/**
- * Connect to the remote system on a background job. The callback is
- * called when the connect is complete.
+ * Asynchronously connect to the remote system.
*
- * @param callback to call after connect is complete
- * @throws Exception
- */
- public void connect(IRSECallback callback) throws Exception;
-
- /**
- * Connect to the remote system on a background job. The callback is
- * called when the connect is complete.
+ * An Eclipse background job with a progress monitor will
+ * be created automatically. If the optional callback is
+ * given, will be called when the connect is complete.
*
* @param forcePrompt forces the prompt dialog even if the password is in mem
- * @param callback to call after connect is complete
+ * @param callback to call after connect is complete.
+ * May be null
.
* @throws Exception
*/
public void connect(boolean forcePrompt, IRSECallback callback) throws Exception;
-
-
-
/**
* Disconnect from the remote system.
* In addition to calling getSystem().disconnect(),this must fire an
@@ -432,105 +410,28 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
public void disconnect(boolean collapseTree) throws Exception;
/**
- * Modal thread version of resolve filter strings
* Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
+ * factory reports true for supportsFilters().
*
* When a user expands a filter containing filter strings, this method is - * invoked for each filter string. + * invoked for each filter string. *
* The resulting objects are displayed in the remote system view tree. They - * can be anything, but at a minimum must support IAdaptable in order to - * drive the property sheet. You can just defer the getAdapter request to - * the platform's Adapter manager if desired. + * can be anything, but at a minimum must support IAdaptable in order to + * drive the property sheet. You can just defer the getAdapter request to + * the platform's Adapter manager if desired. *
* You should supply an adapter class for the returned object's class, - * to render objects in the Remote System Explorer view. It will uses a - * label and content provider that defers all requests to the adapter, - * which it gets by querying the platform's adapter manager for the object - * type. Be sure to register your adapter factory. - * - * @param monitor the process monitor associated with this operation - * @param filterString filter pattern for objects to return. - * @return Array of objects that are the result of this filter string - */ - public Object[] resolveFilterString(IProgressMonitor monitor, String filterString) throws Exception; - - /** - * Modal thread version of resolve filter strings - * Resolve an absolute filter string. This is only applicable if the subsystem - * factory reports true for supportsFilters(). - *
- * When a user expands a filter containing filter strings, this method is - * invoked for each filter string. - *
- * The resulting objects are displayed in the remote system view tree. They - * can be anything, but at a minimum must support IAdaptable in order to - * drive the property sheet. You can just defer the getAdapter request to - * the platform's Adapter manager if desired. - *
- * You should supply an adapter class for the returned object's class, - * to render objects in the Remote System Explorer view. It will uses a - * label and content provider that defers all requests to the adapter, - * which it gets by querying the platform's adapter manager for the object - * type. Be sure to register your adapter factory. - * - * @param monitor the process monitor associated with this operation - * @param filterStrings filter patterns for objects to return. - * @return Array of objects that are the result of this filter string - */ - public Object[] resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) throws Exception; - - /** - * Modal thread version of resolve filter strings - * Resolve an absolute filter string. This is only applicable if the subsystem - * factory reports true for supportsFilters(). - *
- * When a user expands a filter containing filter strings, this method is - * invoked for each filter string. - *
- * The resulting objects are displayed in the remote system view tree. They - * can be anything, but at a minimum must support IAdaptable in order to - * drive the property sheet. You can just defer the getAdapter request to - * the platform's Adapter manager if desired. - *
- * You should supply an adapter class for the returned object's class, - * to render objects in the Remote System Explorer view. It will uses a - * label and content provider that defers all requests to the adapter, - * which it gets by querying the platform's adapter manager for the object - * type. Be sure to register your adapter factory. - * - * @param monitor the process monitor associated with this operation - * @param parent the parent object to query - * @param filterString filter pattern for objects to return. - * @return Array of objects that are the result of this filter string - */ - public Object[] resolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws Exception; - - /** - * Resolve an absolute filter string. This is only applicable if the subsystem - * factory reports true for supportsFilters(). - *
- * When a user expands a filter containing filter strings, this method is - * invoked for each filter string. - *
- * The resulting objects are displayed in the remote system view tree. They - * can be anything, but at a minimum must support IAdaptable in order to - * drive the property sheet. You can just defer the getAdapter request to - * the platform's Adapter manager if desired. - *
- * You should supply an adapter class for the returned object's class, - * to render objects in the Remote System Explorer view. It will uses a - * label and content provider that defers all requests to the adapter, - * which it gets by querying the platform's adapter manager for the object - * type. Be sure to register your adapter factory. + * to render objects in the Remote System Explorer view. It will uses a + * label and content provider that defers all requests to the adapter, + * which it gets by querying the platform's adapter manager for the object + * type. Be sure to register your adapter factory. * * @param filterString filter pattern for objects to return. + * @param monitor the process monitor associated with this operation * @return Array of objects that are the result of this filter string - * - * @deprecated use resolveFilterString(IProgressMonitor monitor, String filterString) instead */ - public Object[] resolveFilterString(String filterString) throws Exception; + public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception; /** * Resolve multiple absolute filter strings. This is only applicable if the subsystem @@ -540,14 +441,14 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I * filter strings versus a single filter string. * * @param filterStrings array of filter patterns for objects to return. - * @return Array of objects that are the result of resolving all the filter strings - * - * @deprecated use resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) instead + * @param monitor the process monitor associated with this operation + * + * @return Array of objects that are the result of this filter string */ - public Object[] resolveFilterStrings(String[] filterStrings) throws Exception; + public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor) throws Exception; /** - * Resolve an relative filter string. This is only applicable if the subsystem + * Resolve a relative filter string. This is only applicable if the subsystem * factory reports true for supportsFilters(). *
* When a user expands an object that came from a previous filter string expansion,
@@ -569,11 +470,11 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
*
* @param parent Object that is being expanded.
* @param filterString filter pattern for children of parent.
- * @return Array of objects that are the result of this filter string
- *
- * @deprecated use resolveFilterString(IProgressMonitor monitor, String filterString) instead
+ * @param monitor the process monitor associated with this operation
+ *
+ * @return Array of objects that are the result of this filter string
*/
- public Object[] resolveFilterString(Object parent, String filterString) throws Exception;
+ public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor) throws Exception;
/*
* Execute a remote command. This is only applicable if the subsystem factory reports
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java
index c41a3fb6d4f..c6c19a94d93 100644
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java
+++ b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/internal/eclipse/filesystem/RSEFileStoreImpl.java
@@ -16,6 +16,7 @@
* - Fix early startup issues by deferring FileStore evaluation and classloading,
* - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
* - Also remove unnecessary class RSEFileCache and obsolete branding files.
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.eclipse.filesystem;
@@ -335,7 +336,7 @@ public class RSEFileStoreImpl extends FileStore
if (subSys instanceof FileServiceSubSystem) {
FileServiceSubSystem fileServiceSubSystem = ((FileServiceSubSystem)subSys);
- IHostFile[] results = fileServiceSubSystem.getFileService().getFilesAndFolders(monitor, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
+ IHostFile[] results = fileServiceSubSystem.getFileService().getFilesAndFolders(remoteFile.getAbsolutePath(), "*", monitor); //$NON-NLS-1$
IRemoteFileSubSystemConfiguration config = subSys.getParentRemoteFileSubSystemConfiguration();
RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
filterString.setShowFiles(true);
@@ -410,7 +411,7 @@ public class RSEFileStoreImpl extends FileStore
if (subSys instanceof FileServiceSubSystem) {
FileServiceSubSystem fileServiceSubSystem = ((FileServiceSubSystem)subSys);
- IHostFile[] results = fileServiceSubSystem.getFileService().getFilesAndFolders(monitor, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
+ IHostFile[] results = fileServiceSubSystem.getFileService().getFilesAndFolders(remoteFile.getAbsolutePath(), "*", monitor); //$NON-NLS-1$
IRemoteFileSubSystemConfiguration config = subSys.getParentRemoteFileSubSystemConfiguration();
RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
filterString.setShowFiles(true);
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
index a83c270cd66..778b0f8ba6b 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
@@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* 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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@@ -1087,7 +1088,7 @@ public class UniversalFileTransferUtility
if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
{
SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
- ((FileServiceSubSystem)targetFS).getFileService().setLastModified(monitor, newPathBuf.toString(), name, properties.getRemoteFileTimeStamp());
+ ((FileServiceSubSystem)targetFS).getFileService().setLastModified(newPathBuf.toString(), name, properties.getRemoteFileTimeStamp(), monitor);
}
}
@@ -1288,7 +1289,7 @@ public class UniversalFileTransferUtility
if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
{
SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
- targetFS.setLastModified(monitor, copiedFile, properties.getRemoteFileTimeStamp());
+ targetFS.setLastModified(copiedFile, properties.getRemoteFileTimeStamp(), monitor);
}
return copiedFile;
@@ -1484,7 +1485,7 @@ public class UniversalFileTransferUtility
if (source instanceof IFile)
{
SystemIFileProperties properties = new SystemIFileProperties(source);
- target.getParentRemoteFileSubSystem().setLastModified(monitor, target, properties.getRemoteFileTimeStamp());
+ target.getParentRemoteFileSubSystem().setLastModified(target, properties.getRemoteFileTimeStamp(), monitor);
}
else if (source instanceof IContainer)
{
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java
index 8769ee90ae9..7c2e893410e 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.files.ui.propertypages;
@@ -449,7 +450,7 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage
{
try
{
- getRemoteFile().getParentRemoteFileSubSystem().setReadOnly(new NullProgressMonitor(), getRemoteFile(), readOnlySelected);
+ getRemoteFile().getParentRemoteFileSubSystem().setReadOnly(getRemoteFile(), readOnlySelected, new NullProgressMonitor());
RSEUIPlugin.getTheSystemRegistry().fireEvent(
new org.eclipse.rse.core.events.SystemResourceChangeEvent(
getRemoteFile(),ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,null));
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 8fbc22b6d88..9bf539335da 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
@@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@@ -580,7 +581,7 @@ public class SystemViewRemoteFileAdapter
* Return the children of this object.
* If this is a folder or root, we list all child folders and files.
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
return internalGetChildren(monitor, element, null);
}
@@ -589,7 +590,7 @@ public class SystemViewRemoteFileAdapter
* Return the children of this object.
* If this is a folder or root, we list all child folders and files.
*/
- public Object[] getChildren(IProgressMonitor monitor, IContextObject context)
+ public Object[] getChildren(IContextObject context, IProgressMonitor monitor)
{
return internalGetChildren(monitor, context.getModelObject(), context.getFilterReference());
}
@@ -716,11 +717,11 @@ public class SystemViewRemoteFileAdapter
if (monitor != null)
{
- children = ss.resolveFilterString(monitor, file, filter);
+ children = ss.resolveFilterString(file, filter, monitor);
}
else
{
- children = ss.resolveFilterString(new NullProgressMonitor(), file, filter);
+ children = ss.resolveFilterString(file, filter, new NullProgressMonitor());
}
if ((children == null) || (children.length == 0))
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java
index 1df513d5c25..b9094ea8fb4 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemOutputRemoteTypes
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@@ -235,7 +236,7 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt
/**
* Returns nothing
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
return null;
}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java
index 7fe68da691a..939456b3e3f 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@@ -136,7 +137,7 @@ public class SystemViewRemoteSearchResultSetAdapter extends AbstractSystemViewAd
/**
* Returns the search results for the given search handle
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
if (element instanceof IHostSearchResultSet) {
IHostSearchResultSet output = (IHostSearchResultSet)element;
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java
index 9b79f8a2c59..be864c105a9 100644
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java
+++ b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java
@@ -1,5 +1,3 @@
-package org.eclipse.rse.internal.importexport.files;
-
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
@@ -9,7 +7,10 @@ package org.eclipse.rse.internal.importexport.files;
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
+package org.eclipse.rse.internal.importexport.files;
+
import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;
@@ -320,7 +321,7 @@ public class UniFilePlus extends File {
if (time < 0) throw new IllegalArgumentException();
try {
IProgressMonitor monitor = new NullProgressMonitor();
- ok = remoteFile.getParentRemoteFileSubSystem().setLastModified(monitor, remoteFile, time);
+ ok = remoteFile.getParentRemoteFileSubSystem().setLastModified(remoteFile, time, monitor);
} catch (RemoteFileException exc) {
Exception e = exc.getRemoteException();
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
@@ -332,7 +333,7 @@ public class UniFilePlus extends File {
public boolean setReadOnly() {
boolean ok = false;
try {
- ok = remoteFile.getParentRemoteFileSubSystem().setReadOnly(new NullProgressMonitor(), remoteFile, true);
+ ok = remoteFile.getParentRemoteFileSubSystem().setReadOnly(remoteFile, true, new NullProgressMonitor());
} catch (RemoteFileException exc) {
Exception e = exc.getRemoteException();
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java
index 31e6a5b6cee..8d9fec6da76 100644
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java
+++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.processes.ui.view;
@@ -161,7 +162,7 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
return false;
}
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
IRemoteProcess process = (IRemoteProcess) element;
IRemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
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 269847fe837..75fdc253fb3 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
@@ -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
@@ -12,7 +12,7 @@
*
* Contributors:
* Kevin Doyle (IBM) - Fix 183870 - Display File Exists Error
- * {Name} (company) - description of contribution.
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.services.dstore.files;
@@ -188,8 +188,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
- public boolean upload(IProgressMonitor monitor, InputStream inputStream, String remoteParent, String remoteFile,
- boolean isBinary, String hostEncoding)
+ public boolean upload(InputStream inputStream, String remoteParent, String remoteFile, boolean isBinary,
+ String hostEncoding, IProgressMonitor monitor)
{
BufferedInputStream bufInputStream = null;
@@ -343,8 +343,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
return true;
}
- public boolean upload(IProgressMonitor monitor, File file, String remoteParent, String remoteFile,
- boolean isBinary, String srcEncoding, String hostEncoding)
+ public boolean upload(File file, String remoteParent, String remoteFile, boolean isBinary,
+ String srcEncoding, String hostEncoding, IProgressMonitor monitor)
{
FileInputStream inputStream = null;
BufferedInputStream bufInputStream = null;
@@ -360,7 +360,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
// if the file is empty, create new empty file on host
if (totalBytes == 0)
{
- IHostFile created = createFile(monitor, remoteParent, remoteFile);
+ IHostFile created = createFile(remoteParent, remoteFile, monitor);
return created.exists();
}
@@ -560,8 +560,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
}
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile,
- boolean isBinary, String encoding) throws SystemMessageException
+ public boolean download(String remoteParent, String remoteFile, File localFile, boolean isBinary,
+ String encoding, IProgressMonitor monitor) throws SystemMessageException
{
DataElement universaltemp = getMinerElement();
@@ -606,7 +606,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
{
// need to refetch
- DStoreHostFile hostFile = (DStoreHostFile)getFile(monitor, remoteParent, remoteFile);
+ DStoreHostFile hostFile = (DStoreHostFile)getFile(remoteParent, remoteFile, monitor);
de = hostFile._element;
}
long fileLength = DStoreHostFile.getFileLength(de.getSource());
@@ -715,7 +715,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
return true;
}
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name)
+ public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor)
{
DataElement de = null;
if (name.equals(".") && name.equals(remoteParent)) //$NON-NLS-1$
@@ -822,10 +822,10 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
public IHostFile getUserHome()
{
- return getFile(null, ".","."); //$NON-NLS-1$ //$NON-NLS-2$
+ return getFile(".", ".",null); //$NON-NLS-1$ //$NON-NLS-2$
}
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
+ public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
DataElement de = getElementFor(remotePath);
@@ -846,7 +846,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
}
}
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
+ public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = remoteParent + getSeparator(remoteParent) + folderName;
DataElement de = getElementFor(remotePath);
@@ -867,7 +867,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
}
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
+ public boolean delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
DataElement de = getElementFor(remotePath);
@@ -885,9 +885,9 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
}
- public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException
+ public boolean deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
{
- if (remoteParents.length == 1) return delete(monitor, remoteParents[0], fileNames[0]);
+ if (remoteParents.length == 1) return delete(remoteParents[0], fileNames[0], monitor);
ArrayList dataElements = new ArrayList(remoteParents.length);
for (int i = 0; i < remoteParents.length; i++)
@@ -903,7 +903,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
else return true;
}
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException
+ public boolean rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = remoteParent + getSeparator(remoteParent) + oldName;
DataElement de = getElementFor(remotePath);
@@ -922,24 +922,24 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException
{
- boolean retVal = rename(monitor, remoteParent, oldName, newName);
+ boolean retVal = rename(remoteParent, oldName, newName, monitor);
String newPath = remoteParent + getSeparator(remoteParent) + newName;
oldFile.renameTo(newPath);
return retVal;
}
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
+ public boolean move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
{
// String src = srcParent + getSeparator(srcParent) + srcName;
// String tgt = tgtParent + getSeparator(tgtParent) + tgtName;
// boolean isVirtual = ArchiveHandlerManager.isVirtual(src) || ArchiveHandlerManager.isVirtual(tgt);
//if (isVirtual || isArchive)
{
- if (copy(monitor, srcParent, srcName, tgtParent, tgtName))
+ if (copy(srcParent, srcName, tgtParent, tgtName, monitor))
{
try
{
- delete(monitor, srcParent, srcName);
+ delete(srcParent, srcName, monitor);
}
catch (Exception e)
{
@@ -1042,7 +1042,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
}
}
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
+ public boolean copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
{
DataStore ds = getDataStore();
String srcRemotePath = srcParent + getSeparator(srcParent) + srcName;
@@ -1096,7 +1096,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
return false;
}
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException
+ public boolean copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException
{
DataStore ds = getDataStore();
@@ -1154,17 +1154,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
- public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter)
+ public IHostFile[] getFolders(String remoteParent, String fileFilter, IProgressMonitor monitor)
{
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS);
}
- public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter)
+ public IHostFile[] getFiles(String remoteParent, String fileFilter, IProgressMonitor monitor)
{
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FILES);
}
- public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter)
+ public IHostFile[] getFilesAndFolders(String remoteParent, String fileFilter, IProgressMonitor monitor)
{
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_ALL);
}
@@ -1229,8 +1229,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
return true;
}
- public boolean setLastModified(IProgressMonitor monitor, String parent,
- String name, long timestamp) throws SystemMessageException
+ public boolean setLastModified(String parent, String name,
+ long timestamp, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = parent + getSeparator(parent) + name;
DataElement de = getElementFor(remotePath);
@@ -1249,8 +1249,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
return false;
}
- public boolean setReadOnly(IProgressMonitor monitor, String parent,
- String name, boolean readOnly) throws SystemMessageException
+ public boolean setReadOnly(String parent, String name,
+ boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = parent + getSeparator(parent) + name;
DataElement de = getElementFor(remotePath);
@@ -1308,7 +1308,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
/* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#getInputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
*/
- public InputStream getInputStream(IProgressMonitor monitor, String remoteParent, String remoteFile, boolean isBinary) throws SystemMessageException
+ public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException
{
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
int mode;
@@ -1328,7 +1328,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
/* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
*/
- public OutputStream getOutputStream(IProgressMonitor monitor, String remoteParent, String remoteFile, boolean isBinary) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
int mode;
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java
index 5c7c8871d3d..1e0d9b3b0d7 100644
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java
+++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.services.dstore.processes;
@@ -61,7 +61,7 @@ public class DStoreProcessService extends AbstractProcessService implements IPro
return ServiceResources.DStore_Process_Service_Description;
}
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException
+ public IHostProcess[] listAllProcesses(IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException
{
if (!isInitialized())
{
@@ -183,14 +183,14 @@ public class DStoreProcessService extends AbstractProcessService implements IPro
return _statusMonitor;
}
- public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException
+ public boolean kill(long PID, String signal, IProgressMonitor monitor) throws SystemMessageException
{
try
{
DataStore ds = getDataStore();
// run kill command on host
- DStoreHostProcess process = (DStoreHostProcess) getProcess(monitor, PID);
+ DStoreHostProcess process = (DStoreHostProcess) getProcess(PID, monitor);
// if there is no process, simply return true
if (process == null) {
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java
index a8096cdf8d0..12fab7fc6a3 100644
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java
+++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.services.dstore.search;
@@ -52,7 +52,7 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc
return UniversalFileSystemMiner.MINER_ID;
}
- public void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService)
+ public void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
{
DStoreHostFile searchTarget = (DStoreHostFile) searchConfig.getSearchTarget();
@@ -121,7 +121,7 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc
return argList;
}
- public void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig)
+ public void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor)
{
DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
DataElement status = config.getStatusObject();
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java
index 5d82d3c39d2..5ec51a485a9 100644
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java
+++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.services.dstore.shells;
@@ -34,7 +34,6 @@ import org.eclipse.rse.services.dstore.util.DStoreStatusMonitor;
import org.eclipse.rse.services.shells.IHostShell;
import org.eclipse.rse.services.shells.IShellService;
-
public class DStoreShellService extends AbstractDStoreService implements IShellService
{
protected String[] _envVars;
@@ -58,16 +57,16 @@ public class DStoreShellService extends AbstractDStoreService implements IShellS
}
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment)
+ public IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor)
{
if (!isInitialized())
{
waitForInitialize(null);
}
- return launchShell(monitor, initialWorkingDirectory, null, environment);
+ return launchShell(initialWorkingDirectory, null, environment, monitor);
}
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment)
+ public IHostShell launchShell(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor)
{
if (!isInitialized())
{
@@ -76,18 +75,18 @@ public class DStoreShellService extends AbstractDStoreService implements IShellS
return new DStoreHostShell(getStatusMonitor(getDataStore()), getDataStore(), initialWorkingDirectory, ">", encoding, environment); //$NON-NLS-1$
}
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command,
- String[] environment)
+ public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment,
+ IProgressMonitor monitor)
{
if (!isInitialized())
{
waitForInitialize(null);
}
- return runCommand(monitor, initialWorkingDirectory, command, null, environment);
+ return runCommand(initialWorkingDirectory, command, null, environment, monitor);
}
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command,
- String encoding, String[] environment)
+ public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding,
+ String[] environment, IProgressMonitor monitor)
{
if (!isInitialized())
{
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 e31a09e2807..22cc29784be 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
@@ -38,6 +38,7 @@
* Javier Montalvo Orus (Symbian) - Fixing 169680 - [ftp] FTP files subsystem and service should use passive mode
* Javier Montalvo Orus (Symbian) - Fixing 174828 - [ftp] Folders are attempted to be removed as files
* Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.services.files.ftp;
@@ -417,7 +418,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#getFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
*/
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
+ public IHostFile getFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
{
if (monitor!=null){
if (monitor.isCanceled()) {
@@ -567,7 +568,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#upload(org.eclipse.core.runtime.IProgressMonitor, java.io.File, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String)
*/
- public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException
+ public boolean upload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
{
boolean retValue = true;
@@ -639,7 +640,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#upload(org.eclipse.core.runtime.IProgressMonitor, java.io.InputStream, java.lang.String, java.lang.String, boolean, java.lang.String)
*/
- public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException
+ public boolean upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
{
boolean retValue = true;
@@ -667,7 +668,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
if(retValue == true){
setFileType(isBinary);
- retValue = upload(monitor, tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding); //$NON-NLS-1$
+ retValue = upload(tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding, monitor); //$NON-NLS-1$
}
}
@@ -683,7 +684,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#download(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.io.File, boolean, java.lang.String)
*/
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException
+ public boolean download(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
{
boolean retValue = true;
@@ -693,7 +694,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
}
}
- IHostFile remoteHostFile = getFile(null,remoteParent,remoteFile);
+ IHostFile remoteHostFile = getFile(remoteParent,remoteFile,null);
FTPClient ftpClient = getFTPClient();
@@ -806,7 +807,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
/* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#delete(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
*/
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException {
+ public boolean delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException {
boolean hasSucceeded = false;
FTPClient ftpClient = getFTPClient();
@@ -815,7 +816,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
progressMonitor.init(FTPServiceResources.FTP_File_Service_Deleting_Task+fileName, 1);
- boolean isFile = getFile(null,remoteParent,fileName).isFile();
+ boolean isFile = getFile(remoteParent,fileName,null).isFile();
try {
hasSucceeded = FTPReply.isPositiveCompletion(ftpClient.cwd(remoteParent));
@@ -858,7 +859,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)
*/
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException {
+ public boolean rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException {
boolean success = false;
@@ -896,7 +897,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
/* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#move(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException{
+ public boolean move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException{
boolean success = false;
@@ -924,7 +925,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
/* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#createFolder(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
*/
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
+ public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
{
FTPClient ftpClient = getFTPClient();
@@ -946,18 +947,18 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
throw new RemoteFileIOException(e);
}
- return getFile(monitor, remoteParent, folderName);
+ return getFile(remoteParent, folderName, monitor);
}
/* (non-Javadoc)
* @see org.eclipse.rse.services.files.IFileService#createFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
*/
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException{
+ public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException{
try {
File tempFile = File.createTempFile("ftp", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
tempFile.deleteOnExit();
- boolean success = upload(monitor, tempFile, remoteParent, fileName, _isBinaryFileType, null, null);
+ boolean success = upload(tempFile, remoteParent, fileName, _isBinaryFileType, null, null, monitor);
if(!success)
{
@@ -968,21 +969,21 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
throw new RemoteFileIOException(e);
}
- return getFile(monitor, remoteParent, fileName);
+ return getFile(remoteParent, fileName, monitor);
}
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
+ public boolean copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
{
throw new RemoteFileIOException(new Exception(FTPServiceResources.FTP_File_Service_Copy_Not_Supported));
}
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException
+ public boolean copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException
{
boolean hasSucceeded = false;
for(int i=0; i
- * When a user expands a filter this method is invoked for each filter string and the
- * results are concatenated and displayed to the user. You can affect the post-concatenated
- * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- *
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
- * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- *
- * Be sure to register your adapter factory in your plugin's startup method.
- *
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you. Just override internalResolveFilterString.
- *
- * @param filterString filter pattern for objects to return.
- * @return the results of resolving the filter string.
- *
- * @deprecated use resolveFilterString(IProgressMonitor monitor, String filterString) instead
- */
- public Object[] resolveFilterString(String filterString)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- return internalResolveFilterString(new NullProgressMonitor(), filterString);
- }
- else
- {
- return null;
- }
- }
- /**
- * Resolve multiple absolute filter strings. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- *
- * This is the same as {@link #resolveFilterString(String)} but takes an array of
- * filter strings versus a single filter string.
- *
- * The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}.
- *
- * After successful resolve, the sort method is called to sort the concatenated results before
- * returning them.
- *
- * @param filterStrings array of filter patterns for objects to return.
- * @return Array of objects that are the result of resolving all the filter strings
- *
- * @deprecated should use resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) instead
- */
- public Object[] resolveFilterStrings(String[] filterStrings)
- throws Exception
- {
-
- boolean ok = true;
-
- if ((filterStrings == null) || (filterStrings.length == 0)) {
- SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
- return null;
- }
-
- if (!isConnected()) {
- ok = promptForPassword();
- }
-
- if (ok)
- {
- return internalResolveFilterStrings(new NullProgressMonitor(), filterStrings);
- }
- else
- {
- return null;
- }
-
- }
-
protected void scheduleJob(SubSystemOperationJob job, ISchedulingRule rule) throws InterruptedException
{
IRunnableContext context = getRunnableContext(/*shell*/); // dwd needed for side effect or for prompt?
@@ -2115,29 +2024,42 @@ public abstract class SubSystem extends RSEModelObject
/**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
+ * Resolve an absolute filter string.
+ *
+ * This is only applicable if the subsystem
+ * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
+ * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
+ * is called when the subsystem itself is expanded.
*
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
+ * When a user expands a filter this method is invoked for each filter string and the
+ * results are concatenated and displayed to the user. You can affect the post-concatenated
+ * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
+ * sort the result, say, or pick our redundancies.
*
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
+ * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
+ * There are two requirements on the returned objects: A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
+ * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
+ * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
+ *
+ * Be sure to register your adapter factory in your plugin's startup method.
+ *
+ * You do not need to override this, as it does the progress monitor and error message
+ * displaying for you. Just override internalResolveFilterString.
*
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
* @param filterString filter pattern for objects to return.
+ * @param monitor the process monitor associated with this operation
+ *
* @return Array of objects that are the result of this filter string
*/
- public Object[] resolveFilterString(IProgressMonitor monitor, String filterString) throws Exception
+ public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
{
boolean ok = true;
if (!isConnected())
@@ -2156,32 +2078,30 @@ public abstract class SubSystem extends RSEModelObject
}
/**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
+ * Resolve multiple absolute filter strings. This is only applicable if the subsystem
* factory reports true for supportsFilters().
*
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
+ * This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of
+ * filter strings versus a single filter string.
*
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
+ * The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}.
*
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
+ * After successful resolve, the sort method is called to sort the concatenated results before
+ * returning them.
*
+ * @param filterStrings array of filter patterns for objects to return.
* @param monitor the process monitor associated with this operation
- * @param filterStrings filter patterns for objects to return.
+ *
* @return Array of objects that are the result of this filter string
*/
- public Object[] resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings)
+ public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
throws Exception
{
boolean ok = true;
+ if ((filterStrings == null) || (filterStrings.length == 0)) {
+ SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
+ return null;
+ }
if (!isConnected())
ok = promptForPassword();
if (ok)
@@ -2197,50 +2117,6 @@ public abstract class SubSystem extends RSEModelObject
}
}
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- *
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- *
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- *
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param parent the object to query
- * @param filterString filter pattern for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
-
- if (ok)
- {
- Object[] results= internalResolveFilterString(monitor, parent, filterString);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
-
/**
* Resolve a relative filter string.
*
@@ -2269,29 +2145,30 @@ public abstract class SubSystem extends RSEModelObject
*
* @param parent Object that is being expanded.
* @param filterString filter pattern for children of parent. Typically just "*".
- *
- * @deprecated use resolveFilterString(IProgressMonitor monitor, Object parent, String filterString) instead
+ * @param monitor the process monitor associated with this operation
+ *
+ * @return Array of objects that are the result of this filter string
*/
- public Object[] resolveFilterString(Object parent, String filterString)
- throws Exception
+ public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
+ throws Exception
{
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- return internalResolveFilterString(new NullProgressMonitor(), parent, filterString);
- }
- else
- {
- return null;
- }
+ boolean ok = true;
+ if (!isConnected())
+ ok = promptForPassword();
+
+ if (ok)
+ {
+ Object[] results= internalResolveFilterString(monitor, parent, filterString);
+ if (sortResults && (results!=null))
+ results = sortResolvedFilterStringObjects(results);
+ return results;
+ }
+ else
+ {
+ return null;
+ }
}
-
-
-
-
/**
* Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
* true for supportsCommands().
@@ -2388,7 +2265,7 @@ public abstract class SubSystem extends RSEModelObject
job.schedule();
job.join();
} else {
- connect(false);
+ connect(false, null);
}
// Display display = Display.getCurrent();
// while (job.getResult() == null) {
@@ -2400,18 +2277,6 @@ public abstract class SubSystem extends RSEModelObject
}
}
-
-
- /**
- * Required for Bug 176603
- *
- * @deprecated
- */
- public void connect(IProgressMonitor monitor) throws Exception
- {
- connect(monitor, false);
- }
-
/**
* Connect to a remote system with a monitor.
* Required for Bug 176603
@@ -2461,25 +2326,11 @@ public abstract class SubSystem extends RSEModelObject
}
}
-
- public void connect(IRSECallback callback) throws Exception
- {
- connect(false, callback);
- }
-
- /**
- * @deprecated
- */
- public void connect(boolean forcePrompt) throws Exception
- {
- connect(forcePrompt, null);
- }
-
/**
* Connect to the remote system, optionally forcing a signon prompt even if the password
* is cached in memory or on disk.
* You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
+ * displaying for you.
*
* Override internalConnect if you want, but by default it calls getSystem().connect(IProgressMonitor).
*
@@ -2518,9 +2369,7 @@ public abstract class SubSystem extends RSEModelObject
}
}
-
-
- /**
+ /**
* A convenience method, fully equivalent to promptForPassword(false).
*/
public boolean promptForPassword() throws Exception
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandAdapter.java
index f46bd4e3eb1..9d8f0fe7c25 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandAdapter.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandAdapter.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
@@ -117,7 +118,7 @@ public class SystemTeamViewCompileCommandAdapter extends AbstractSystemViewAdapt
/**
* Return the children of this profile.
*/
- public Object[] getChildren(IProgressMonitor mon, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor mon) {
//SystemTeamViewCompileCommandNode cmd = (SystemTeamViewCompileCommandNode)element;
return null;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileTypeAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileTypeAdapter.java
index db981c64924..1b6c0fd24fb 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileTypeAdapter.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileTypeAdapter.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
@@ -118,7 +119,7 @@ public class SystemTeamViewCompileTypeAdapter extends AbstractSystemViewAdapter
/**
* Return the children of this profile.
*/
- public Object[] getChildren(IProgressMonitor mon, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor mon) {
SystemTeamViewCompileTypeNode type = (SystemTeamViewCompileTypeNode) element;
SystemCompileCommand[] cmds = type.getCompileType().getCompileCommandsArray();
SystemTeamViewCompileCommandNode[] nodes = null;
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewUserActionAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewUserActionAdapter.java
index 59553de5043..4a4096cecc4 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewUserActionAdapter.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewUserActionAdapter.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
@@ -125,7 +126,7 @@ public class SystemTeamViewUserActionAdapter extends AbstractSystemViewAdapter i
/**
* Return the children of this profile.
*/
- public Object[] getChildren(IProgressMonitor mon, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor mon) {
//SystemUDActionElement action = (SystemUDActionElement)element;
return null;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java
index 473f879bbc9..a383316be92 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
@@ -526,7 +527,7 @@ public abstract class SystemUDActionSubsystem implements ISystemSubstitutor {
if (cmdSubSystem != null) {
ok = true;
try {
- cmdSubSystem.runCommand(new NullProgressMonitor(), cmdString, context);
+ cmdSubSystem.runCommand(cmdString, context, new NullProgressMonitor());
} catch (Exception e) {
SystemBasePlugin.logError("RunUserAction", e); //$NON-NLS-1$
SystemMessageDialog.displayExceptionMessage(shell, e);
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java
index a015521a285..7de804e8dc8 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java
@@ -8,6 +8,7 @@
* Don Yantzi (IBM) - initial contribution.
* David Dykstal (IBM) - initial contribution.
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.tests.core.connection;
@@ -176,7 +177,7 @@ public class RSEConnectionTestCase extends RSEBaseConnectionTestCase {
Object[] objects = null;
try {
- objects = subsystem.resolveFilterString(null, "/bin/*"); //$NON-NLS-1$
+ objects = subsystem.resolveFilterString("/bin/*", null); //$NON-NLS-1$
} catch(Exception e) {
exception = e;
cause = e.getLocalizedMessage();
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java
index b3d28e40807..d01620dddd9 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.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] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.tests.internal.testsubsystem;
@@ -125,7 +126,7 @@ public class TestSubSystemNodeAdapter extends AbstractSystemViewAdapter
/* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element) {
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
if (isTestSubSystemNodeContainer(element))
return ((ITestSubSystemNodeContainer)element).getChildNodes();
return null;
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
index 8efc24de23d..23173c5da45 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
@@ -8,6 +8,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.tests.subsystems.files;
@@ -57,7 +58,7 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
public void tearDown() {
try {
- fs.delete(mon, tempDir.getParent(), tempDir.getName());
+ fs.delete(tempDir.getParent(), tempDir.getName(), mon);
} catch(SystemMessageException msg) {
assertFalse("Exception: "+msg.getLocalizedMessage(), true); //$NON-NLS-1$
}
@@ -99,7 +100,7 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
if (!RSETestsPlugin.isTestCaseEnabled("FileServiceTest.testCreateFile")) return; //$NON-NLS-1$
String testName = getTestFileName();
- IHostFile hf = fs.createFile(mon, tempDirPath, testName);
+ IHostFile hf = fs.createFile(tempDirPath, testName, mon);
assertTrue(hf.exists());
assertTrue(hf.canRead());
assertTrue(hf.canWrite());
@@ -119,21 +120,21 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
String testName = getTestFileName();
String testName2 = testName.toUpperCase();
- IHostFile hf = fs.createFile(mon, tempDirPath, testName);
+ IHostFile hf = fs.createFile(tempDirPath, testName, mon);
if (fss.isCaseSensitive()) {
//UNIX: uppercase version must be distinct
- IHostFile hf2 = fs.getFile(mon, tempDirPath, testName2);
+ IHostFile hf2 = fs.getFile(tempDirPath, testName2, mon);
assertFalse(hf2.exists());
- hf2 = fs.createFolder(mon, tempDirPath, testName2);
+ hf2 = fs.createFolder(tempDirPath, testName2, mon);
assertTrue(hf2.exists());
assertTrue(hf2.isDirectory());
assertFalse(hf.equals(hf2));
} else {
//Windows: uppercase version must be the same
- IHostFile hf2 = fs.getFile(mon, tempDirPath, testName2);
+ IHostFile hf2 = fs.getFile(tempDirPath, testName2, mon);
assertTrue(hf2.exists());
try {
- hf2 = fs.createFolder(mon, tempDirPath, testName2);
+ hf2 = fs.createFolder(tempDirPath, testName2, mon);
} catch(SystemMessageException e) {
//Windows cannot create a folder when the file is already there
assertNotNull(e);
null
. Clients can override to return an output stream to the file.
- * @see org.eclipse.rse.services.files.IFileService#getOutputStream(IProgressMonitor, String, String, boolean)
+ * @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, boolean, IProgressMonitor)
*/
- public OutputStream getOutputStream(IProgressMonitor monitor, String remoteParent, String remoteFile, boolean isBinary) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
return null;
}
}
\ No newline at end of file
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 a104ffd8898..dea9219b0ec 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
@@ -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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.services.files;
@@ -45,97 +45,97 @@ public interface IFileService extends IService
/**
* Copy a file to the remote file system. The remote target is denoted by a
* string representing the parent and a string representing the file.
- * @param monitor the monitor for this potentially long running operation
* @param stream input stream to transfer
* @param remoteParent - a string designating the parent folder of the target for this file.
* @param remoteFile - a string designating the name of the file to be written on the remote system.
* @param isBinary - indicates whether the file is text or binary
* @param hostEncoding - the tgt encoding of the file (if text)
+ * @param monitor the monitor for this potentially long running operation
* @return true if the file was uploaded
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException;
+ public boolean upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException;
/**
* Copy a file to the remote file system. The remote target is denoted by a
* string representing the parent and a string representing the file.
- * @param monitor the monitor for this potentially long running operation
* @param localFile - a real file in the local file system.
* @param remoteParent - a string designating the parent folder of the target for this file.
* @param remoteFile - a string designating the name of the file to be written on the remote system.
* @param isBinary - indicates whether the file is text or binary
* @param srcEncoding - the src encoding of the file (if text)
* @param hostEncoding - the tgt encoding of the file (if text)
+ * @param monitor the monitor for this potentially long running operation
* @return true if the file was uploaded
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException;
+ public boolean upload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException;
/**
* Copy a file from the remote file system to the local system.
- * @param monitor the monitor for this potentially long running operation
* @param remoteParent - a String designating the remote parent.
* @param remoteFile - a String designating the remote file residing in the parent.
* @param localFile - The file that is to be written. If the file exists it is
* overwritten.
* @param isBinary - indicates whether the file is text on binary
* @param hostEncoding - the encoding on the host (if text)
+ * @param monitor the monitor for this potentially long running operation
* @return true if the file was copied from the remote system.
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException;
+ public boolean download(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException;
/**
- * @param monitor the monitor for this potentially long running operation
* @param remoteParent
* @param name
+ * @param monitor the monitor for this potentially long running operation
* @return the host file given the parent path and file name
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name) throws SystemMessageException;
+ public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor) throws SystemMessageException;
/**
- * @param monitor the monitor for this potentially long running operation
* @param remoteParent - the name of the parent directory on the remote file
* system from which to retrieve the child list.
* @param fileFilter - a string that can be used to filter the children. Only
* those files matching the filter make it into the list. The interface
* does not dictate where the filtering occurs.
+ * @param monitor the monitor for this potentially long running operation
* @return the list of host files.
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
+ public IHostFile[] getFilesAndFolders(String remoteParent, String fileFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
- * @param monitor the monitor for this potentially long running operation
* @param remoteParent - the name of the parent directory on the remote file
* system from which to retrieve the child list.
* @param fileFilter - a string that can be used to filter the children. Only
* those files matching the filter make it into the list. The interface
* does not dictate where the filtering occurs.
+ * @param monitor the monitor for this potentially long running operation
* @return the list of host files.
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
+ public IHostFile[] getFiles(String remoteParent, String fileFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
- * @param monitor the monitor for this potentially long running operation
* @param remoteParent - the name of the parent directory on the remote file
* system from which to retrieve the child list.
* @param fileFilter - a string that can be used to filter the children. Only
* those files matching the filter make it into the list. The interface
* does not dictate where the filtering occurs.
+ * @param monitor the monitor for this potentially long running operation
* @return the list of host files.
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
+ public IHostFile[] getFolders(String remoteParent, String fileFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
* @param monitor the monitor for this potentially long running operation
@@ -154,61 +154,61 @@ public interface IFileService extends IService
/**
* Create a file on the host
- * @param monitor the monitor for this potentially long running operation
* @param remoteParent the parent directory
* @param fileName the name of the new file
+ * @param monitor the monitor for this potentially long running operation
* @return the newly created file
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException;
+ public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException;
/**
* Create a folder on the host
- * @param monitor the progress monitor
* @param remoteParent the parent directory
* @param folderName the name of the new folder
+ * @param monitor the progress monitor
* @return the newly created folder
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException;
+ public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException;
/**
* Deletes a file or folder on the host
- * @param monitor the progress monitor
* @param remoteParent the folder containing the file to delete
* @param fileName the name of the file or folder to delete
+ * @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 delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException;
+ public boolean delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException;
/**
* Deletes a set of files or folders on the host. Should throw an exception if some files and folders were deleted and others were not
* due to an exception during the operation. Without an exception thrown in such cases, views may not be refreshed correctly to account
* for deleted resources.
- * @param monitor the progress monitor
* @param remoteParents the array of folders containing the files to delete
* @param fileNames the names of the files or folders to delete
+ * @param monitor the progress monitor
* @return true iff all deletes are successful
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException;
+ public boolean deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException;
/**
* 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 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) throws SystemMessageException;
+ public boolean rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException;
/**
* Renames a file or folder on the host
@@ -225,41 +225,41 @@ public interface IFileService extends IService
/**
* Move the file or folder specified
- * @param monitor the progress monitor
* @param srcParent the folder containing the file or folder to move
* @param srcName the new of the file or folder to move
* @param tgtParent the destination folder for the move
* @param tgtName the name of the moved file or folder
+ * @param monitor the progress monitor
* @return true if the file was moved
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException;
+ public boolean move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException;
/**
* Copy the file or folder to the specified destination
- * @param monitor the progress monitor
* @param srcParent the folder containing the file or folder to copy
* @param srcName the new of the file or folder to copy
* @param tgtParent the destination folder for the copy
* @param tgtName the name of the copied file or folder
+ * @param monitor the progress monitor
* @return true if the file was copied successfully
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException;
+ public boolean copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException;
/**
* Copy a set of files or folders to the specified destination
- * @param monitor the progress monitor
* @param srcParents the folders containing each file or folder to copy
* @param srcNames the names of the files or folders to copy
* @param tgtParent the destination folder for the copy
+ * @param monitor the progress monitor
* @return true if all files were copied
* @throws SystemMessageException if an error occurs.
* Typically this would be one of those in the RemoteFileException family.
*/
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException;
+ public boolean copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException;
/**
* Indicates whether the file system is case sensitive
@@ -269,23 +269,23 @@ public interface IFileService extends IService
/**
* Sets the last modified stamp of the file or folder with the specified timestamp
- * @param monitor the progress monitor
* @param parent the parent path of the file to set
* @param name the name of the file to set
* @param timestamp the new timestamp
+ * @param monitor the progress monitor
* @return true if the file timestamp was changed successfully
*/
- public boolean setLastModified(IProgressMonitor monitor, String parent, String name, long timestamp) throws SystemMessageException;
+ public boolean setLastModified(String parent, String name, long timestamp, IProgressMonitor monitor) throws SystemMessageException;
/**
* Sets the readonly permission of the file or folder
- * @param monitor the progress monitor
* @param parent the parent path of the file to set
* @param name the name of the file to set
* @param readOnly indicates whether to make the file readonly or read-write
+ * @param monitor the progress monitor
* @return true if the readonly permission was changed successfully
*/
- public boolean setReadOnly(IProgressMonitor monitor, String parent, String name, boolean readOnly) throws SystemMessageException;
+ public boolean setReadOnly(String parent, String name, boolean readOnly, IProgressMonitor monitor) throws SystemMessageException;
/**
* Gets the remote encoding.
@@ -298,25 +298,25 @@ public interface IFileService extends IService
/**
* Gets the input stream to access the contents a remote file. Clients should close the input stream when done.
- * @param monitor the progress monitor.
* @param remoteParent the absolute path of the parent.
* @param remoteFile the name of the remote file.
* @param isBinary true
if the file is a binary file, false
otherwise.
+ * @param monitor the progress monitor.
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since 2.0
*/
- public InputStream getInputStream(IProgressMonitor monitor, String remoteParent, String remoteFile, boolean isBinary) throws SystemMessageException;
+ public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
/**
* Gets the output stream to write to a remote file. Clients should close the output stream when done.
- * @param monitor the progress monitor.
* @param remoteParent the absolute path of the parent.
* @param remoteFile the name of the remote file.
* @param isBinary true
if the file is a binary file, false
otherwise.
+ * @param monitor the progress monitor.
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since 2.0
*/
- public OutputStream getOutputStream(IProgressMonitor monitor, String remoteParent, String remoteFile, boolean isBinary) throws SystemMessageException;
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
index 0095ca8ac91..60a354015a2 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.services.processes;
@@ -25,19 +25,19 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
public abstract class AbstractProcessService implements IProcessService
{
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, String exeNameFilter, String userNameFilter, String stateFilter) throws SystemMessageException
+ public IHostProcess[] listAllProcesses(String exeNameFilter, String userNameFilter, String stateFilter, IProgressMonitor monitor) throws SystemMessageException
{
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
rpfs.setName(exeNameFilter);
rpfs.setUsername(userNameFilter);
rpfs.setSpecificState(stateFilter);
- return listAllProcesses(monitor, rpfs);
+ return listAllProcesses(rpfs, monitor);
}
public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException
{
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- return listAllProcesses(monitor, rpfs);
+ return listAllProcesses(rpfs, monitor);
}
/**
@@ -50,39 +50,39 @@ public abstract class AbstractProcessService implements IProcessService
public IHostProcess[] listRootProcesses(IProgressMonitor monitor) throws SystemMessageException
{
IHostProcess[] roots = new IHostProcess[1];
- roots[0] = getProcess(monitor, 1);
+ roots[0] = getProcess(1, monitor);
return roots;
}
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID) throws SystemMessageException
+ public IHostProcess[] listChildProcesses(long parentPID, IProgressMonitor monitor) throws SystemMessageException
{
String pPidString = "" + parentPID; //$NON-NLS-1$
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
rpfs.setPpid(pPidString);
- return listAllProcesses(monitor, rpfs);
+ return listAllProcesses(rpfs, monitor);
}
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter) throws SystemMessageException
+ public IHostProcess[] listChildProcesses(long parentPID, IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException
{
String pPidString = "" + parentPID; //$NON-NLS-1$
filter.setPpid(pPidString);
- return listAllProcesses(monitor, filter);
+ return listAllProcesses(filter, monitor);
}
- public IHostProcess getParentProcess(IProgressMonitor monitor, long PID) throws SystemMessageException
+ public IHostProcess getParentProcess(long pid, IProgressMonitor monitor) throws SystemMessageException
{
- return getProcess(monitor, getProcess(monitor, PID).getPPid());
+ return getProcess(getProcess(pid, monitor).getPPid(), monitor);
}
- public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException
+ public IHostProcess getProcess(long pid, IProgressMonitor monitor) throws SystemMessageException
{
- String pidString = "" + PID; //$NON-NLS-1$
+ String pidString = "" + pid; //$NON-NLS-1$
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
rpfs.setPid(pidString);
- IHostProcess[] results = listAllProcesses(monitor, rpfs);
+ IHostProcess[] results = listAllProcesses(rpfs, monitor);
if ((results == null) || (results.length == 0)) return null;
else return results[0];
}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
index 04fe7f4a19e..2c538855933 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.services.processes;
@@ -43,23 +43,23 @@ public interface IProcessService extends IService
/**
* Return a filtered list of all processes on the remote system.
- * @param monitor A progress monitor to which progress will be reported
* @param filter An object to filter results by
+ * @param monitor A progress monitor to which progress will be reported
* @return Filtered list of processes
* @throws SystemMessageException
*/
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException;
+ public IHostProcess[] listAllProcesses(IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a filtered list of all processes on the remote system.
- * @param monitor A progress monitor to which progress will be reported
* @param exeNameFilter The executable name to filter results by, or null if no exeName filtering
* @param userNameFilter The user name to filter results by, or null if no userName filtering
* @param stateFilter The state code to filter results by, or null if no state filtering
+ * @param monitor A progress monitor to which progress will be reported
* @return Filtered list of processes
* @throws SystemMessageException
*/
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, String exeNameFilter, String userNameFilter, String stateFilter) throws SystemMessageException;
+ public IHostProcess[] listAllProcesses(String exeNameFilter, String userNameFilter, String stateFilter, IProgressMonitor monitor) throws SystemMessageException;
/**
* Returns root processes on the remote system
@@ -71,51 +71,51 @@ public interface IProcessService extends IService
/**
* Return a list of all remote child processes of the given parent process on the remote system
- * @param monitor A progress monitor to which progress will be reported
* @param parentPID The ID of the parent process whose children are to be listed
+ * @param monitor A progress monitor to which progress will be reported
* @return List of child processes
* @throws SystemMessageException
*/
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID) throws SystemMessageException;
+ public IHostProcess[] listChildProcesses(long parentPID, IProgressMonitor monitor) throws SystemMessageException;
/**
* Return a filtered list of remote child processes of the given parent process on the remote system
- * @param monitor A progress monitor to which progress will be reported
* @param parentPID The ID of the parent process whose children are to be listed
* @param filter A filter to narrow results by
+ * @param monitor A progress monitor to which progress will be reported
* @return Filtered list of child processes
* @throws SystemMessageException
*/
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter) throws SystemMessageException;
+ public IHostProcess[] listChildProcesses(long parentPID, IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException;
/**
* Given a process, return its parent process object.
+ * @param pid the ID of the process to return parent of.
* @param monitor A progress monitor to which progress will be reported
- * @param PID the ID of the process to return parent of.
* @return The parent process
* @throws SystemMessageException
*/
- public IHostProcess getParentProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
+ public IHostProcess getParentProcess(long pid, IProgressMonitor monitor) throws SystemMessageException;
/**
* Given a pid, return an IHostProcess object for it.
- * @param monitor A progress monitor to which progress will be reported
- * @param PID The process ID of the desired process
- * @return IHostProcess object for the given pid
+ * @param pid The process ID of the desired process
+ * @param monitor A progress monitor to which progress will be reported
+ * @return IHostProcess object for the given pid
* @throws SystemMessageException
*/
- public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
+ public IHostProcess getProcess(long pid, IProgressMonitor monitor) throws SystemMessageException;
/**
* Kills a process.
- * @param monitor A progress monitor to which progress will be reported
- * @param PID the ID of the process to be killed.
+ * @param pid the ID of the process to be killed.
* @param signal the signal to send to the process
+ * @param monitor A progress monitor to which progress will be reported
* @return false
if the given process doesn't exist, else true
.
* Throws an exception if anything fails.
* @throws SystemMessageException
*/
- public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException;
+ public boolean kill(long pid, String signal, IProgressMonitor monitor) throws SystemMessageException;
/**
* Returns a list of the types of signals that can be sent to
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 32d81dd9b62..0d6a4fa713c 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
@@ -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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.services.search;
@@ -33,14 +33,14 @@ public abstract class AbstractSearchService implements ISearchService
_searches = new HashMap();
}
- public final void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService)
+ public final void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
{
ISearchHandler handler = internalSearch(monitor, searchConfig, fileService);
_searches.put(searchConfig, handler);
}
- public final void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig)
+ public final void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor)
{
ISearchHandler handler = (ISearchHandler)_searches.get(searchConfig);
handler.cancel(monitor);
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java
index 401fcef2665..cd43259db68 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.services.search;
@@ -21,7 +21,7 @@ import org.eclipse.rse.services.files.IFileService;
public interface ISearchService
{
- public void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService);
- public void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig);
+ public void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor);
+ public void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor);
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java
index f57ebefdae2..e2b6b5b76f9 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.services.shells;
@@ -28,43 +28,43 @@ public interface IShellService extends IService
{
/**
* Launch a new shell in the specified directory
- * @param monitor
* @param initialWorkingDirectory
* @param environment Array of environment variable Strings of the form "var=text"
+ * @param monitor
* @return the shell object
*/
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment);
+ public IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor);
/**
* Launch a new shell in the specified directory
- * @param monitor
* @param initialWorkingDirectory
* @param encoding
* @param environment Array of environment variable Strings of the form "var=text"
+ * @param monitor
* @return the shell object
*/
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment);
+ public IHostShell launchShell(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor);
/**
* Run a command in it's own shell
- * @param monitor
* @param initialWorkingDirectory
* @param command
* @param environment Array of environment variable Strings of the form "var=text"
+ * @param monitor
* @return the shell object for getting output and error streams
*/
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String[] environment);
+ public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment, IProgressMonitor monitor);
/**
* Run a command in it's own shell
- * @param monitor
* @param initialWorkingDirectory
* @param command
* @param encoding
* @param environment Array of environment variable Strings of the form "var=text"
+ * @param monitor
* @return the shell object for getting output and error streams
*/
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String encoding, String[] environment);
+ public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor);
/**
* Return an array of environment variables that describe the environment on the host.
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java
index d5f9468e9a6..5b1590cbc0c 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.shells.ui;
@@ -152,7 +153,7 @@ public class SystemRemoteCommandEntryForm extends Composite
{
try
{
- currSubSystem.runCommand(new NullProgressMonitor(), cmd, null);
+ currSubSystem.runCommand(cmd, null, new NullProgressMonitor());
}
catch ( Exception e )
{
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 d6c641f1114..6dccfa822b7 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
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.shells.ui.actions;
@@ -448,7 +449,7 @@ public class SystemCommandAction extends SystemBaseAction
if (launchNewShell)
{
- Object[] results = cmdSubSystem.runCommand(monitor, cmd, _selected);
+ Object[] results = cmdSubSystem.runCommand(cmd, _selected, monitor);
Object cmdObject = results[0];
if (cmdObject instanceof IRemoteCommandShell)
{
@@ -470,8 +471,8 @@ public class SystemCommandAction extends SystemBaseAction
{
cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
}
- cmdSubSystem.sendCommandToShell(monitor, cdCmd, defaultShell);
- cmdSubSystem.sendCommandToShell(monitor, cmd, defaultShell);
+ cmdSubSystem.sendCommandToShell(cdCmd, defaultShell, monitor);
+ cmdSubSystem.sendCommandToShell(cmd, defaultShell, monitor);
}
}
else
@@ -479,7 +480,7 @@ public class SystemCommandAction extends SystemBaseAction
IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
if (cmdSubSystem != null)
{
- Object[] results = cmdSubSystem.runCommand(monitor, cmd, _selected);
+ Object[] results = cmdSubSystem.runCommand(cmd, _selected, monitor);
Object cmdObject = results[0];
if (cmdObject instanceof IRemoteCommandShell)
{
@@ -529,7 +530,7 @@ public class SystemCommandAction extends SystemBaseAction
{
SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
- IRemoteCommandShell cmd = cmdSubSystem.runShell(new NullProgressMonitor(), _selected);
+ IRemoteCommandShell cmd = cmdSubSystem.runShell(_selected, new NullProgressMonitor());
cmdsPart.updateOutput(cmd);
}
else
@@ -539,7 +540,7 @@ public class SystemCommandAction extends SystemBaseAction
{
SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
- IRemoteCommandShell cmd = cmdSubSystem.runShell(new NullProgressMonitor(), _selected);
+ IRemoteCommandShell cmd = cmdSubSystem.runShell(_selected, new NullProgressMonitor());
cmdsPart.updateOutput(cmd);
}
//showInView(cmd);
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java
index bec6550e017..97f6ded0719 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2004, 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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.shells.ui.actions;
@@ -82,7 +82,7 @@ public class SystemTerminateShellAction extends SystemBaseShellAction
IRemoteCmdSubSystem cmdSubSystem = command.getCommandSubSystem();
if (cmdSubSystem != null)
{
- cmdSubSystem.cancelShell(new NullProgressMonitor(), command);
+ cmdSubSystem.cancelShell(command, new NullProgressMonitor());
}
}
catch (Exception e)
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java
index 72d736c76b9..5d492d4b0f9 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java
@@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemThemeConstants
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.shells.ui.view;
@@ -450,7 +451,7 @@ FocusListener
IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
try
{
- commandSubSystem.sendCommandToShell(new NullProgressMonitor(), inputStr, remoteCommand);
+ commandSubSystem.sendCommandToShell(inputStr, remoteCommand, new NullProgressMonitor());
}
catch (Exception e)
{
@@ -471,7 +472,7 @@ FocusListener
IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
try
{
- commandSubSystem.sendCommandToShell(new NullProgressMonitor(), "#break", remoteCommand); //$NON-NLS-1$
+ commandSubSystem.sendCommandToShell("#break", remoteCommand, new NullProgressMonitor()); //$NON-NLS-1$
}
catch (Exception e)
{
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java
index 39c67ea6bd9..0dc3dabd378 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.shells.ui.view;
@@ -149,7 +150,7 @@ public class SystemCommandsViewPart
{
try
{
- IRemoteCommandShell cmd = _cmdSubSystem.runShell(new NullProgressMonitor(), null);
+ IRemoteCommandShell cmd = _cmdSubSystem.runShell(null, new NullProgressMonitor());
if (cmd != null)
{
showInView(cmd);
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java
index b2d34d1e939..3b2cb00e469 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.shells.ui;
@@ -155,9 +156,9 @@ public class RemoteCommandHelpers
cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
}
- cmdSubSystem.sendCommandToShell(monitor, cdCmd, defaultShell);
+ cmdSubSystem.sendCommandToShell(cdCmd, defaultShell, monitor);
}
- cmdSubSystem.sendCommandToShell(monitor, cmdString, defaultShell);
+ cmdSubSystem.sendCommandToShell(cmdString, defaultShell, monitor);
}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java
index 9058e28bbf6..44b207e04e4 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java
@@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemOutputRemoteTypes
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.shells.ui.view;
@@ -336,7 +337,7 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter
/**
* Returns the children of a remote command if the element is a remote command
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
if (element instanceof IRemoteCommandShell)
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 bda2757d436..3437ad39403 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
@@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - Fix 162962 - recursive removeCachedRemoteFile()
* Martin Oberhuber (Wind River) - [168596] FileServiceSubSystem.isCaseSensitive()
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
@@ -282,22 +283,22 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
protected IHostFile[] getFolders(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException
{
- return getFileService().getFolders(monitor, parentPath, fileNameFilter);
+ return getFileService().getFolders(parentPath, fileNameFilter, monitor);
}
protected IHostFile[] getFiles(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException
{
- return getFileService().getFiles(monitor, parentPath, fileNameFilter);
+ return getFileService().getFiles(parentPath, fileNameFilter, monitor);
}
protected IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException
{
- return getFileService().getFilesAndFolders(monitor, parentPath, fileNameFilter);
+ return getFileService().getFilesAndFolders(parentPath, fileNameFilter, monitor);
}
protected IHostFile getFile(IProgressMonitor monitor, String parentPath, String fileName) throws SystemMessageException
{
- return getFileService().getFile(monitor, parentPath, fileName);
+ return getFileService().getFile(parentPath, fileName, monitor);
}
protected IHostFile[] getRoots(IProgressMonitor monitor) throws InterruptedException, SystemMessageException
@@ -451,7 +452,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
File localFile = new File(localpath);
try
{
- getFileService().download(monitor, parentPath, file.getName(), localFile, isBinary(file), file.getEncoding());
+ getFileService().download(parentPath, file.getName(), localFile, isBinary(file), file.getEncoding(), monitor);
}
catch (SystemMessageException e)
{
@@ -508,7 +509,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
}
try
{
- getFileService().upload(monitor, new File(source), remoteParentPath, remoteFileName, isBinary, srcEncoding, rmtEncoding);
+ getFileService().upload(new File(source), remoteParentPath, remoteFileName, isBinary, srcEncoding, rmtEncoding, monitor);
}
catch (SystemMessageException e)
{
@@ -543,7 +544,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
try
{
- getFileService().upload(monitor, new File(source), remoteParentPath, remoteFileName, isBinary, encoding, hostEncoding);
+ getFileService().upload(new File(source), remoteParentPath, remoteFileName, isBinary, encoding, hostEncoding, monitor);
}
catch (SystemMessageException e)
{
@@ -557,7 +558,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IFileService service = getFileService();
try
{
- return service.copy(monitor, sourceFolderOrFile.getParentPath(), sourceFolderOrFile.getName(), targetFolder.getAbsolutePath(), newName);
+ return service.copy(sourceFolderOrFile.getParentPath(), sourceFolderOrFile.getName(), targetFolder.getAbsolutePath(), newName, monitor);
}
catch (SystemMessageException e)
{
@@ -581,7 +582,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
}
try
{
- return service.copyBatch(monitor, sourceParents, sourceNames, targetFolder.getAbsolutePath());
+ return service.copyBatch(sourceParents, sourceNames, targetFolder.getAbsolutePath(), monitor);
}
catch (SystemMessageException e)
{
@@ -613,7 +614,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
try
{
- newFile = service.createFile(monitor, parent, name);
+ newFile = service.createFile(parent, name, monitor);
}
catch (SystemMessageException e)
{
@@ -634,7 +635,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IHostFile newFolder = null;
try
{
- newFolder = service.createFolder(monitor, parent, name);
+ newFolder = service.createFolder(parent, name, monitor);
}
catch (SystemMessageException e)
{
@@ -658,7 +659,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
String name = folderOrFile.getName();
try
{
- result = service.delete(monitor, parent, name);
+ result = service.delete(parent, name, monitor);
folderOrFile.markStale(true);
}
catch (SystemMessageException e)
@@ -686,7 +687,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
IFileService service = getFileService();
try
{
- result = service.deleteBatch(monitor, parents, names);
+ result = service.deleteBatch(parents, names, monitor);
}
catch (SystemMessageException e)
{
@@ -707,7 +708,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
String newPath = srcParent + folderOrFile.getSeparator() + newName;
try
{
- result = service.rename(monitor, srcParent, oldName, newName);
+ result = service.rename(srcParent, oldName, newName, monitor);
folderOrFile.getHostFile().renameTo(newPath);
}
catch (SystemMessageException e)
@@ -729,7 +730,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
try
{
removeCachedRemoteFile(sourceFolderOrFile);
- result = service.move(monitor, srcParent, srcName, tgtParent, newName);
+ result = service.move(srcParent, srcName, tgtParent, newName, monitor);
sourceFolderOrFile.markStale(true);
targetFolder.markStale(true);
}
@@ -743,13 +744,13 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
}
- public boolean setLastModified(IProgressMonitor monitor, IRemoteFile folderOrFile, long newDate) throws RemoteFileSecurityException, RemoteFileIOException
+ public boolean setLastModified(IRemoteFile folderOrFile, long newDate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
{
String name = folderOrFile.getName();
String parent = folderOrFile.getParentPath();
try
{
- return _hostFileService.setLastModified(monitor, parent, name, newDate);
+ return _hostFileService.setLastModified(parent, name, newDate, monitor);
}
catch (SystemMessageException e)
{
@@ -759,13 +760,13 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
}
}
- public boolean setReadOnly(IProgressMonitor monitor, IRemoteFile folderOrFile, boolean readOnly) throws RemoteFileSecurityException, RemoteFileIOException
+ public boolean setReadOnly(IRemoteFile folderOrFile, boolean readOnly, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
{
String name = folderOrFile.getName();
String parent = folderOrFile.getParentPath();
try
{
- return _hostFileService.setReadOnly(monitor, parent, name, readOnly);
+ return _hostFileService.setReadOnly(parent, name, readOnly, monitor);
}
catch (SystemMessageException e)
{
@@ -804,7 +805,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
ISearchService searchService = getSearchService();
if (searchService != null)
{
- searchService.cancelSearch(null, searchConfig);
+ searchService.cancelSearch(searchConfig, null);
}
}
@@ -904,7 +905,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
* @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem#getInputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return getFileService().getInputStream(monitor, remoteParent, remoteFile, isBinary);
+ return getFileService().getInputStream(remoteParent, remoteFile, isBinary, monitor);
}
/**
@@ -912,6 +913,6 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
* @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem#getOutputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return getFileService().getOutputStream(monitor, remoteParent, remoteFile, isBinary);
+ return getFileService().getOutputStream(remoteParent, remoteFile, isBinary, monitor);
}
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java
index 8941e50dd70..ad25e514f23 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
@@ -43,7 +43,7 @@ public class SearchJob extends Job
protected IStatus run(IProgressMonitor monitor)
{
- _searchService.search(monitor, _searchConfig, _fileService);
+ _searchService.search(_searchConfig, _fileService, monitor);
OutputRefresh refresh = new OutputRefresh(_searchConfig);
Display.getDefault().asyncExec(refresh);
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
index bf471e0bea7..5d26c17e2fd 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
@@ -13,6 +13,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.subsystems.files.core.subsystems;
@@ -383,24 +384,24 @@ public interface IRemoteFileSubSystem extends ISubSystem {
/**
* Set the last modified date for the given file or folder. Like a Unix "touch" operation.
* Folder or file must exist on disk for this to succeed.
- *
- * @param monitor the progress monitor
* @param folderOrFile represents the object to be renamed.
* @param newDate new date, in milliseconds from epoch, to assign.
+ * @param monitor the progress monitor
+ *
* @return false if the given folder/file didn't exist on disk (operation fails), else true. Throws an exception if anything fails.
*/
- public boolean setLastModified(IProgressMonitor monitor, IRemoteFile folderOrFile, long newDate) throws RemoteFileSecurityException, RemoteFileIOException;
+ public boolean setLastModified(IRemoteFile folderOrFile, long newDate, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
/**
* Set a files readonly permissions.
* Folder or file must exist on disk for this to succeed.
- *
- * @param monitor the progress monitor
* @param folderOrFile represents the object to be renamed.
* @param readOnly whether to set it to be readonly or not
+ * @param monitor the progress monitor
+ *
* @return false if the given folder/file didn't exist on disk (operation fails), else true. Throws an exception if anything fails.
*/
- public boolean setReadOnly(IProgressMonitor monitor, IRemoteFile folderOrFile, boolean readOnly) throws RemoteFileSecurityException, RemoteFileIOException;
+ public boolean setReadOnly(IRemoteFile folderOrFile, boolean readOnly, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
// ----------------------------
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java
index 2a5d1f09f98..7cd2df7273f 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java
@@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.files.dstore;
@@ -122,7 +122,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe
{
try
{
- return _fileSubSystem.getFileService().getFile(null, _searchObject.getParentPath(), _searchObject.getName());
+ return _fileSubSystem.getFileService().getFile(_searchObject.getParentPath(), _searchObject.getName(), null);
}
catch (Exception e)
{
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java
index 9439e299907..1800056f259 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java
@@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.files.local;
@@ -29,7 +29,6 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAda
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-
public class LocalSearchResultConfiguration extends AbstractSearchResultConfiguration
{
protected IHostFileToRemoteFileAdapter _fileAdapter;
@@ -98,14 +97,14 @@ public class LocalSearchResultConfiguration extends AbstractSearchResultConfigur
}
// cancel search
- getSearchService().cancelSearch(null, this);
+ getSearchService().cancelSearch(this, null);
}
public Object getSearchTarget()
{
try
{
- return _fileSubSystem.getFileService().getFile(null, _searchObject.getParentPath(), _searchObject.getName());
+ return _fileSubSystem.getFileService().getFile(_searchObject.getParentPath(), _searchObject.getName(), null);
//return _searchObject.getAbsolutePath();
}
catch (Exception e)
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
index 8e33fbfa41a..bea9a2d6d0e 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.subsystems.processes.servicesubsystem;
@@ -91,7 +92,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
rpfs.setPid("" + pid); //$NON-NLS-1$
IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
- IHostProcess process = getProcessService().getProcess(null, pid);
+ IHostProcess process = getProcessService().getProcess(pid, null);
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcess(context, null, process);
}
@@ -109,7 +110,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException
{
checkIsConnected();
- return getProcessService().kill(null, process.getPid(), signal);
+ return getProcessService().kill(process.getPid(), signal, null);
}
/* (non-Javadoc)
@@ -118,7 +119,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException
{
checkIsConnected();
- IHostProcess[] processes = getProcessService().listAllProcesses(monitor, processFilter);
+ IHostProcess[] processes = getProcessService().listAllProcesses(processFilter, monitor);
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
}
@@ -128,7 +129,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
{
checkIsConnected();
- IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid(), processFilter);
+ IHostProcess[] processes = getProcessService().listChildProcesses(parent.getPid(), processFilter, monitor);
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
}
@@ -138,7 +139,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
{
checkIsConnected();
- IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid());
+ IHostProcess[] processes = getProcessService().listChildProcesses(parent.getPid(), monitor);
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java
index 587e9f8e035..57263d19fee 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java
@@ -13,6 +13,7 @@
* Contributors:
* Yu-Fen Kuo (MontaVista) - adapted from RSE UniversalLinuxProcessHandler
* Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
@@ -90,7 +91,7 @@ public class LinuxProcessHelper {
IShellService shellService = Activator.getShellService(host);
IHostShell hostShell = shellService.launchShell(
- new NullProgressMonitor(), "", null); //$NON-NLS-1$
+ "", null, new NullProgressMonitor()); //$NON-NLS-1$
hostShell.writeToShell(getUserNameCommand());
Process p = null;
try {
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java
index ce747456136..066e3c126e0 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java
@@ -8,6 +8,7 @@
* Contributors:
* Yu-Fen Kuo (MontaVista) - initial API and implementation
* Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
@@ -65,8 +66,8 @@ public class LinuxShellProcessService extends AbstractProcessService {
return statusTypes;
}
- public boolean kill(final IProgressMonitor monitor, final long PID,
- final String signal) throws SystemMessageException {
+ public boolean kill(final long PID, final String signal,
+ final IProgressMonitor monitor) throws SystemMessageException {
String signalString;
if (signal
.equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT))
@@ -75,7 +76,7 @@ public class LinuxShellProcessService extends AbstractProcessService {
signalString = "-" + signal; //$NON-NLS-1$
IShellService shellService = Activator.getShellService(host);
IHostShell hostShell = shellService.launchShell(
- new NullProgressMonitor(), "", null); //$NON-NLS-1$
+ "", null, new NullProgressMonitor()); //$NON-NLS-1$
hostShell.writeToShell(getKillCommand(PID, signalString));
Process p = null;
try {
@@ -98,8 +99,8 @@ public class LinuxShellProcessService extends AbstractProcessService {
return false;
}
- public IHostProcess[] listAllProcesses(final IProgressMonitor monitor,
- final IHostProcessFilter filter) throws SystemMessageException {
+ public IHostProcess[] listAllProcesses(final IHostProcessFilter filter,
+ final IProgressMonitor monitor) throws SystemMessageException {
// this is to workaround RSE bug 147531
if (filter.getUsername().equals("${user.id}") && host != null) { //$NON-NLS-1$
IShellServiceSubSystem ss = Activator.getShellServiceSubSystem(host);
@@ -117,7 +118,7 @@ public class LinuxShellProcessService extends AbstractProcessService {
}
IShellService shellService = Activator.getShellService(host);
IHostShell hostShell = shellService.launchShell(
- new NullProgressMonitor(), "", null); //$NON-NLS-1$
+ "", null, new NullProgressMonitor()); //$NON-NLS-1$
hostShell.writeToShell(getProcessesCommand());
Process p = null;
try {
@@ -213,7 +214,7 @@ public class LinuxShellProcessService extends AbstractProcessService {
protected String[] internalGetSignalTypes() {
IShellService shellService = Activator.getShellService(host);
IHostShell hostShell = shellService.launchShell(
- new NullProgressMonitor(), "", null); //$NON-NLS-1$
+ "", null, new NullProgressMonitor()); //$NON-NLS-1$
hostShell.writeToShell(getSignalTypesCommand());
Process p = null;
try {
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java
index 6122bc274ff..62b932897c1 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.model;
@@ -107,7 +108,7 @@ public abstract class RemoteCommandShellOperation
try
{
RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- _remoteCmdShell = _cmdSubSystem.runShell(new NullProgressMonitor(), _pwd);
+ _remoteCmdShell = _cmdSubSystem.runShell(_pwd, new NullProgressMonitor());
}
catch (Exception e)
{
@@ -139,7 +140,7 @@ public abstract class RemoteCommandShellOperation
{
try
{
- _cmdSubSystem.cancelShell(new NullProgressMonitor(), _remoteCmdShell);
+ _cmdSubSystem.cancelShell(_remoteCmdShell, new NullProgressMonitor());
}
catch (Exception e)
{
@@ -185,7 +186,7 @@ public abstract class RemoteCommandShellOperation
// echo command appended after ; so that
// it isn't treated like stdin for the intial command
- _cmdSubSystem.sendCommandToShell(new NullProgressMonitor(), cmd + _cmdSeparator + echoCmd, _remoteCmdShell);
+ _cmdSubSystem.sendCommandToShell(cmd + _cmdSeparator + echoCmd, _remoteCmdShell, new NullProgressMonitor());
}
catch (Exception e)
@@ -206,7 +207,7 @@ public abstract class RemoteCommandShellOperation
{
try
{
- _cmdSubSystem.sendCommandToShell(new NullProgressMonitor(), input, _remoteCmdShell);
+ _cmdSubSystem.sendCommandToShell(input, _remoteCmdShell, new NullProgressMonitor());
}
catch (Exception e)
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java
index 0e333ddd0ea..fb76de4fe01 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java
@@ -1,5 +1,20 @@
-package org.eclipse.rse.subsystems.shells.core.model;
+/********************************************************************************
+ * 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
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
+ ********************************************************************************/
+package org.eclipse.rse.subsystems.shells.core.model;
import java.util.ArrayList;
import java.util.List;
@@ -74,19 +89,19 @@ public class SimpleCommandOperation
{
if (_runAsShell)
{
- _cmdShell = _subsystem.runShell(null, _workingDirectory);
+ _cmdShell = _subsystem.runShell(_workingDirectory, null);
- _subsystem.sendCommandToShell(new NullProgressMonitor(), command, _cmdShell);
+ _subsystem.sendCommandToShell(command, _cmdShell, new NullProgressMonitor());
if (exitShell)
{
- _subsystem.sendCommandToShell(new NullProgressMonitor(), "exit", _cmdShell); //$NON-NLS-1$
+ _subsystem.sendCommandToShell("exit", _cmdShell, new NullProgressMonitor()); //$NON-NLS-1$
}
}
else
{
- Object[] result =_subsystem.runCommand(new NullProgressMonitor(), command, _workingDirectory, false);
+ Object[] result =_subsystem.runCommand(command, _workingDirectory, false, new NullProgressMonitor());
_cmdShell= (IRemoteCommandShell)result[0];
}
}
@@ -101,13 +116,13 @@ public class SimpleCommandOperation
public void runCommandInShell(String exports, String command, boolean exitShell) throws Exception
{
_runAsShell = true;
- _cmdShell = _subsystem.runShell(null, _workingDirectory);
+ _cmdShell = _subsystem.runShell(_workingDirectory, null);
if (exports != null)
{
- _subsystem.sendCommandToShell(new NullProgressMonitor(), exports, _cmdShell);
+ _subsystem.sendCommandToShell(exports, _cmdShell, new NullProgressMonitor());
}
- _subsystem.sendCommandToShell(new NullProgressMonitor(), command, _cmdShell);
+ _subsystem.sendCommandToShell(command, _cmdShell, new NullProgressMonitor());
if (exitShell)
{
exitShell();
@@ -131,7 +146,7 @@ public class SimpleCommandOperation
{
try
{
- _subsystem.sendCommandToShell(new NullProgressMonitor(), "exit", _cmdShell); //$NON-NLS-1$
+ _subsystem.sendCommandToShell("exit", _cmdShell, new NullProgressMonitor()); //$NON-NLS-1$
}
catch (Exception e)
{
@@ -143,7 +158,7 @@ public class SimpleCommandOperation
{
if (isActive())
{
- _subsystem.sendCommandToShell(new NullProgressMonitor(), input, _cmdShell);
+ _subsystem.sendCommandToShell(input, _cmdShell, new NullProgressMonitor());
}
}
@@ -176,7 +191,7 @@ public class SimpleCommandOperation
{
if (_cmdShell != null && _cmdShell.isActive())
{
- _cmdShell.getCommandSubSystem().cancelShell(null, _cmdShell);
+ _cmdShell.getCommandSubSystem().cancelShell(_cmdShell, null);
}
}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java
index 55a42252475..327cb1b9550 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.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,14 +11,11 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.subsystems;
-//
-
-
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -27,57 +24,51 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.swt.widgets.Shell;
/**
- * @lastgen interface RemoteCmdSubSystem extends SubSystem {}
+ * interface RemoteCmdSubSystem extends SubSystem {}
*/
public interface IRemoteCmdSubSystem extends ISubSystem{
-
-
-
/**
* Return parent subsystem factory, cast to a RemoteCmdSubSystemConfiguration
*/
public IRemoteCmdSubSystemConfiguration getParentRemoteCmdSubSystemConfiguration();
-
-
-
/**
* Execute a remote command. This is only applicable if the subsystem factory reports
* true for supportsCommands().
- * @param monitor the progress monitor
* @param command Command to be executed remotely.
* @param context context of a command (i.e. working directory). Null is valid and means to run the
* command as a shell command in the default shell.
+ * @param monitor the progress monitor
* @return Array of objects that are the result of running this command. Typically, these
* are messages logged by the command.
*/
- public Object[] runCommand(IProgressMonitor monitor, String command, Object context) throws Exception;
+ public Object[] runCommand(String command, Object context, IProgressMonitor monitor) throws Exception;
/**
* Execute a remote command. This is only applicable if the subsystem factory reports
* true for supportsCommands().
- * @param monitor the progress monitor
* @param command Command to be executed remotely.
* @param context context of a command (i.e. working directory). Null is valid and means to run the
* command as a shell command in the default shell.
* @param interpretOutput whether to interpret the output or not
+ * @param monitor the progress monitor
* @return Array of objects that are the result of running this command. Typically, these
* are messages logged by the command.
*/
- public Object[] runCommand(IProgressMonitor monitor, String command, Object context, boolean interpretOutput) throws Exception;
+ public Object[] runCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor) throws Exception;
/**
* Launch a new command shell. This is only applicable if the subsystem factory reports
* true for supportsCommands().
- * @param monitor the progress monitor
* @param context context of a shell (i.e. working directory). Null is valid and means to use the default context.
+ * @param monitor the progress monitor
* @return An object that represents the command and it's output.
*
*/
- public IRemoteCommandShell runShell(IProgressMonitor monitor, Object context) throws Exception;
+ public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception;
/**
* Send a command as input to a running command shell.
@@ -90,20 +81,19 @@ public interface IRemoteCmdSubSystem extends ISubSystem{
/**
* Send a command as input to a running command shell.
- * @param monitor the progress monitor
* @param input the command to invoke in the shell.
* @param commandObject the shell or command to send the invocation to.
+ * @param monitor the progress monitor
*/
- public void sendCommandToShell(IProgressMonitor monitor, String input, Object commandObject) throws Exception;
+ public void sendCommandToShell(String input, Object commandObject, IProgressMonitor monitor) throws Exception;
-
/**
* Cancel a shell or running command.
- * @param monitor the progress monitor
* @param commandObject the shell or command to cancel
+ * @param monitor the progress monitor
*
*/
- public void cancelShell(IProgressMonitor monitor, Object commandObject) throws Exception;
+ public void cancelShell(Object commandObject, IProgressMonitor monitor) throws Exception;
/**
* Remove a shell. If the shell is running cancel it first.
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 9a38555955c..0a5a4b1fd87 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
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.subsystems;
@@ -796,7 +797,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
/**
* overridden so that for universal we don't need to do in modal thread
*/
- public Object[] runCommand(IProgressMonitor monitor, String command, Object context, boolean interpretOutput) throws Exception
+ public Object[] runCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor) throws Exception
{
return internalRunCommand(monitor, command, context, interpretOutput);
}
@@ -827,7 +828,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
/**
* overridden so that for universal we don't need to do in modal thread
*/
- public IRemoteCommandShell runShell(IProgressMonitor monitor, Object context) throws Exception
+ public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception
{
IRemoteCommandShell cmdShell = internalRunShell(monitor, context);
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
@@ -863,9 +864,9 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
* @return Array of objects that are the result of running this command.
* Typically, these are messages logged by the command.
*/
- public Object[] runCommand(IProgressMonitor monitor, String command, Object context) throws Exception
+ public Object[] runCommand(String command, Object context, IProgressMonitor monitor) throws Exception
{
- return runCommand(monitor, command, context, true);
+ return runCommand(command, context, true, monitor);
}
/**
@@ -874,7 +875,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
* @param input the command to invoke in the shell.
* @param commandObject the shell or command to send the invocation to.
*
- * @deprecated use {@link #sendCommandToShell(IProgressMonitor, String, Object)}
+ * @deprecated use {@link #sendCommandToShell(String, Object, IProgressMonitor)}
*/
public void sendCommandToShell(String input, Object commandObject) throws Exception
{
@@ -913,12 +914,11 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
/**
* Send a command as input to a running command shell.
- *
- * @param monitor the progress monitor
* @param input the command to invoke in the shell.
* @param commandObject the shell or command to send the invocation to.
+ * @param monitor the progress monitor
*/
- public void sendCommandToShell(IProgressMonitor monitor, String input, Object commandObject) throws Exception
+ public void sendCommandToShell(String input, Object commandObject, IProgressMonitor monitor) throws Exception
{
boolean ok = true;
if (!isConnected())
@@ -971,11 +971,10 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
/**
* Cancel a shell or running command.
- *
- * @param monitor the progress monitor
* @param commandObject the shell or command to cancel.
+ * @param monitor the progress monitor
*/
- public void cancelShell(IProgressMonitor monitor, Object commandObject) throws Exception
+ public void cancelShell(Object commandObject, IProgressMonitor monitor) throws Exception
{
boolean ok = true;
if (!isConnected())
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 2d51bb75c07..5a61599dd88 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
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
@@ -104,7 +105,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
IShellService service = getShellService();
- IHostShell hostShell = service.runCommand(monitor, cwd, cmd, getUserAndHostEnvVarsAsStringArray());
+ IHostShell hostShell = service.runCommand(cwd, cmd, getUserAndHostEnvVarsAsStringArray(), monitor);
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
hostShell.addOutputListener(cmdShell);
@@ -141,7 +142,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
IShellService service = getShellService();
- IHostShell hostShell = service.launchShell(monitor, cwd, getUserAndHostEnvVarsAsStringArray());
+ IHostShell hostShell = service.launchShell(cwd, getUserAndHostEnvVarsAsStringArray(), monitor);
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
if (cmdShell != null)
{
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 b1599086a06..2d0b5d75d97 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
@@ -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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.actions;
@@ -120,7 +120,7 @@ public class SystemCopyConnectionAction extends SystemBaseCopyAction
//String oldName = oldConnection.getAliasName();
//RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
ISystemProfile targetProfile = (ISystemProfile)targetContainer;
- IHost newConn = sr.copyHost(monitor, oldConnection, targetProfile, newName);
+ IHost newConn = sr.copyHost(oldConnection, targetProfile, newName, monitor);
return (newConn != null);
}
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 e1b55137505..86fefae731d 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
@@ -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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.actions;
@@ -125,7 +125,7 @@ public class SystemMoveConnectionAction extends SystemBaseCopyAction
//String oldName = oldConnection.getAliasName();
//RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
ISystemProfile targetProfile = (ISystemProfile)targetContainer;
- IHost newConn = sr.moveHost(monitor, oldConnection, targetProfile, newName);
+ IHost newConn = sr.moveHost(oldConnection, targetProfile, newName, monitor);
return (newConn != null);
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java
index ed5b2df1daf..efad2e5debe 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.actions;
@@ -152,7 +153,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction
steps = conns.length;
steps += 2; // for filterpools and subsystems
monitor.beginTask(msg, steps);
- newProfile = sr.copySystemProfile(monitor, profile,newName,makeActive);
+ newProfile = sr.copySystemProfile(profile, newName,makeActive,monitor);
monitor.done();
}
catch(java.lang.InterruptedException exc)
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
index 03254cc5ebc..729813abceb 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -356,7 +357,7 @@ public class SystemSelectRemoteObjectAPIProviderImpl
Object[] children = null;
if (filterString == null)
- children = subsystemAdapter.getChildren(new NullProgressMonitor(), (IAdaptable)subsystem);
+ children = subsystemAdapter.getChildren((IAdaptable)subsystem, new NullProgressMonitor());
else
{
children = resolveFilterString(subsystem, filterString);
@@ -592,7 +593,7 @@ public class SystemSelectRemoteObjectAPIProviderImpl
Object[] children = null;
try
{
- children = subsystem.resolveFilterString(new NullProgressMonitor(), filterString);
+ children = subsystem.resolveFilterString(filterString, new NullProgressMonitor());
} catch (InterruptedException exc)
{
if (canceledObject == null)
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java
index 6683a9acd60..26edbfef6b2 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -226,11 +226,11 @@ public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelP
{
if (object instanceof IContextObject)
{
- results = adapter.getChildren(new NullProgressMonitor(), (IContextObject)object);
+ results = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
}
else
{
- results = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
+ results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
}
}
if (adapter instanceof SystemViewRootInputAdapter && results != null)
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewProvider.java
index 76010b92e51..88e65afc20a 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewProvider.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewProvider.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -156,7 +156,7 @@ public class SystemTableViewProvider implements ILabelProvider, ITableLabelProvi
if (adapter != null)
{
adapter.setViewer(_viewer);
- results = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
+ results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
if (adapter instanceof SystemViewRootInputAdapter)
{
ArrayList filterredResults = new ArrayList();
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java
index d43dd2f9e0e..3926269e31b 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -87,7 +87,7 @@ public class SystemTestFilterStringAPIProviderImpl
return children;
try
{
- children = subsystem.resolveFilterString(new NullProgressMonitor(), filterString);
+ children = subsystem.resolveFilterString(filterString, new NullProgressMonitor());
if ((children == null) || (children.length==0))
{
if (nullObject == null)
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
index fb5db5d3020..1fd43f74cc1 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
@@ -22,6 +22,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -5524,7 +5525,7 @@ public class SystemView extends SafeTreeViewer
// need to apply filter
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
IContextObject contextObject = getContextObject((TreeItem)match);
- Object[] newChildren = adapter.getChildren(new NullProgressMonitor(), contextObject);
+ Object[] newChildren = adapter.getChildren(contextObject, new NullProgressMonitor());
internalAdd(match, parentElementOrTreePath, newChildren);
}
else
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java
index 3182d4eb197..2af4011f277 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -65,7 +65,7 @@ public class SystemViewAPIProviderForConnections
public Object[] getSystemViewRoots()
{
//return sr.getSubSystems(connection);
- return getViewAdapter(connection).getChildren(new NullProgressMonitor(), connection); // pc42690
+ return getViewAdapter(connection).getChildren(connection, new NullProgressMonitor()); // pc42690
}
/**
* Return true if {@link #getSystemViewRoots()} will return a non-empty list
@@ -84,7 +84,7 @@ public class SystemViewAPIProviderForConnections
public Object[] getConnectionChildren(IHost selectedConnection)
{
//return sr.getSubSystems(selectedConnection);
- return getViewAdapter(selectedConnection).getChildren(new NullProgressMonitor(), selectedConnection); // pc42690
+ return getViewAdapter(selectedConnection).getChildren(selectedConnection, new NullProgressMonitor()); // pc42690
}
/**
* This method is called by the connection adapter when deciding to show a plus-sign
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java
index 639ac8cc887..cfd56c01b35 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.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] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -137,7 +137,7 @@ public class SystemViewAPIProviderForFilterStrings
Object[] children = null;
try
{
- children = ss.resolveFilterString(new NullProgressMonitor(), filterStringReference.getString());
+ children = ss.resolveFilterString(filterStringReference.getString(), new NullProgressMonitor());
if ((children == null) || (children.length==0))
{
children = new SystemMessageObject[1];
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java
index 39368a526d2..241c68e16c5 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java
@@ -12,9 +12,11 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
@@ -185,7 +187,7 @@ public class SystemViewAPIProviderForFilters
{
if (nestedFilterReferences != null)
{
- Object[] allChildren = ss.resolveFilterStrings(filterStrings);
+ Object[] allChildren = ss.resolveFilterStrings(filterStrings, new NullProgressMonitor());
int nbrNestedFilters = nestedFilterReferences.length;
children = new Object[nbrNestedFilters + allChildren.length];
int idx = 0;
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
index d2fb51591c6..8bdca17660e 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
@@ -20,6 +20,7 @@
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -421,7 +422,7 @@ public class SystemViewConnectionAdapter
/**
* Return the children of this object
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
IHost conn = (IHost)element;
ISystemViewInputProvider input = getInput();
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java
index c1bd9fb6c5f..ac87ed4bf99 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -384,7 +385,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
{
IContainer parentFolder = null;
// corresponds to a folder
- Object[] children = viewAdapter.getChildren(new NullProgressMonitor(), dragObject);
+ Object[] children = viewAdapter.getChildren(dragObject, new NullProgressMonitor());
for (int i = 0; i < children.length; i++)
{
IAdaptable child = (IAdaptable)children[i];
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java
index 3df6eb64ac5..4e7aaa204e2 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -186,7 +187,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter
* Return the children of this filter.
* This is a combination of nested filters and resolved filter objects.
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
ISystemFilter filter = getFilter(element);
// transient filters...
@@ -228,7 +229,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter
}
// otherwise, get children and then cache
else {
- children = checkForNull(ss.resolveFilterStrings(monitor, filterStrings), true);
+ children = checkForNull(ss.resolveFilterStrings(filterStrings, monitor), true);
if (ss.getSubSystemConfiguration().supportsFilterCaching()) {
simpleFilter.setContents(SystemChildrenContentsType.getInstance(), children);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java
index a13d2d307b1..936edbc300a 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -156,7 +157,7 @@ public class SystemViewFilterPoolAdapter extends AbstractSystemViewAdapter
* Return the children of this object.
* For filter pools, this is a list of filters.
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
ISystemFilterPool fp = (ISystemFilterPool)element;
return fp.getSystemFilters();
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java
index 750ef9d67d5..1f202a35a2f 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java
@@ -13,6 +13,7 @@
* Contributors:
* Tobias Schwarz (Wind River) - [181394] Include Context in getAbsoluteName() for filter and pool references
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -209,7 +210,7 @@ public class SystemViewFilterPoolReferenceAdapter
* Return the children of this object.
* For filter pools, this is a list of filters.
*/
- public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
+ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
{
ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)element;
ISubSystem ss = getSubSystem(element);
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 ef6bf203f88..2b7c5973ca5 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
@@ -15,6 +15,7 @@
* Tobias Schwarz (Wind River) - [181394] Include Context in getAbsoluteName() for filter and pool references
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
********************************************************************************/
package org.eclipse.rse.internal.ui.view;
@@ -242,17 +243,17 @@ public class SystemViewFilterReferenceAdapter
*
- *
- *
+ *
+ *