mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
[186128][api] Move IProgressMonitor last in all API
This commit is contained in:
parent
7af0ea93c0
commit
9af75140de
98 changed files with 685 additions and 874 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <code>null</code>.
|
||||
*
|
||||
* @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 <code>null</code>.
|
||||
* @param monitor the progress monitor. Must not be <code>null</code>.
|
||||
* @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 <code>null</code>.
|
||||
* @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().
|
||||
* <p>
|
||||
* When a user expands a filter containing filter strings, this method is
|
||||
* invoked for each filter string.
|
||||
* invoked for each filter string.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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().
|
||||
* <p>
|
||||
* When a user expands a filter containing filter strings, this method is
|
||||
* invoked for each filter string.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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().
|
||||
* <p>
|
||||
* When a user expands a filter containing filter strings, this method is
|
||||
* invoked for each filter string.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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().
|
||||
* <p>
|
||||
* When a user expands a filter containing filter strings, this method is
|
||||
* invoked for each filter string.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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().
|
||||
* <p>
|
||||
* 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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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<srcNames.length; i++)
|
||||
{
|
||||
hasSucceeded = copy(monitor, srcParents[i], srcNames[i], tgtParent, srcNames[i]);
|
||||
hasSucceeded = copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
|
||||
if(!hasSucceeded)
|
||||
{
|
||||
break;
|
||||
|
@ -1119,8 +1120,8 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.files.IFileService#setLastModified(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, long)
|
||||
*/
|
||||
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
|
||||
{
|
||||
// not applicable for FTP
|
||||
return false;
|
||||
|
@ -1130,13 +1131,13 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.files.IFileService#setReadOnly(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
|
||||
*/
|
||||
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 {
|
||||
|
||||
boolean result = false;
|
||||
int permissions = 0;
|
||||
|
||||
FTPHostFile file = (FTPHostFile)getFile(monitor,parent, name);
|
||||
FTPHostFile file = (FTPHostFile)getFile(parent,name, monitor);
|
||||
|
||||
int userPermissions = file.getUserPermissions();
|
||||
int groupPermissions = file.getGroupPermissions();
|
||||
|
@ -1166,9 +1167,9 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
/**
|
||||
* Gets the input stream to access the contents of a remote file.
|
||||
* @since 2.0
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
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 {
|
||||
|
||||
if (monitor != null){
|
||||
|
||||
|
@ -1197,9 +1198,9 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
/**
|
||||
* Gets the output stream to write to a remote file.
|
||||
* @since 2.0
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.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 {
|
||||
|
||||
if (monitor != null){
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation and others. 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
|
||||
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - patch for bug 163103 - NPE in filters
|
||||
* Martin Oberhuber (Wind River) - fix 168586 - isCaseSensitive() on Windows
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.local.files;
|
||||
|
@ -169,7 +170,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
}
|
||||
|
||||
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 isCancelled = false;
|
||||
|
||||
|
@ -284,7 +285,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
|
||||
|
||||
public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File destinationFile, boolean isBinary, String hostEncoding) throws SystemMessageException
|
||||
public boolean download(String remoteParent, String remoteFile, File destinationFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
File file = new File(remoteParent, remoteFile);
|
||||
FileInputStream inputStream = null;
|
||||
|
@ -485,7 +486,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
return true;
|
||||
}
|
||||
|
||||
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 isCancelled = false;
|
||||
FileInputStream inputStream = null;
|
||||
|
@ -747,7 +748,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
|
||||
|
||||
public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name)
|
||||
public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor)
|
||||
{
|
||||
if (name.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
|
||||
{
|
||||
|
@ -788,7 +789,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
|
||||
|
||||
public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
|
||||
public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
File parentFile = new File(remoteParent);
|
||||
File fileToCreate = new File(parentFile, fileName);
|
||||
|
@ -860,7 +861,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
return avp.getVirtualPart();
|
||||
}
|
||||
|
||||
public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
|
||||
public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
File folderToCreate = new File(remoteParent, folderName);
|
||||
if (!folderToCreate.exists())
|
||||
|
@ -891,7 +892,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
return new LocalVirtualHostFile(child);
|
||||
}
|
||||
|
||||
public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
|
||||
public boolean delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
if (fileName.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
|
||||
{
|
||||
|
@ -964,7 +965,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
return file.delete();
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
File fileToRename = new File(remoteParent, oldName);
|
||||
if (ArchiveHandlerManager.isVirtual(fileToRename.getAbsolutePath()))
|
||||
|
@ -977,7 +978,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
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);
|
||||
File newFile = new File(remoteParent, newName);
|
||||
oldFile.renameTo(newFile.getAbsolutePath());
|
||||
return retVal;
|
||||
|
@ -1011,7 +1012,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
return false;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
File sourceFolderOrFile = new File(srcParent, srcName);
|
||||
File targetFolder = new File(tgtParent, tgtName);
|
||||
|
@ -1025,9 +1026,9 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
*
|
||||
*/
|
||||
{
|
||||
if (copy(monitor, srcParent, srcName, tgtParent, tgtName))
|
||||
if (copy(srcParent, srcName, tgtParent, tgtName, monitor))
|
||||
{
|
||||
return delete(monitor, srcParent, srcName);
|
||||
return delete(srcParent, srcName, monitor);
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
@ -1041,7 +1042,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
|
||||
|
||||
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
|
||||
{
|
||||
File srcFile = new File(srcParent, srcName);
|
||||
File tgtFile = new File(tgtParent, tgtName);
|
||||
|
@ -1303,24 +1304,24 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
return !isWindows();
|
||||
}
|
||||
|
||||
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 ok = true;
|
||||
for (int i = 0; i < srcParents.length; i++)
|
||||
{
|
||||
ok = ok && copy(monitor, srcParents[i], srcNames[i], tgtParent, srcNames[i]);
|
||||
ok = ok && copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
public boolean setLastModified(IProgressMonitor monitor, String parent, String name, long timestamp)
|
||||
public boolean setLastModified(String parent, String name, long timestamp, IProgressMonitor monitor)
|
||||
{
|
||||
File file = new File(parent, name);
|
||||
return file.setLastModified(timestamp);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
File file = new File(parent, name);
|
||||
if (readOnly)
|
||||
|
@ -1371,9 +1372,9 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
/**
|
||||
* Gets the input stream to access the contents of a remote file.
|
||||
* @since 2.0
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(IProgressMonitor, String, String, boolean)
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(String, String, boolean, IProgressMonitor)
|
||||
*/
|
||||
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 {
|
||||
|
||||
File file = new File(remoteParent, remoteFile);
|
||||
InputStream stream = null;
|
||||
|
@ -1391,9 +1392,9 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
/**
|
||||
* Gets the output stream to write to a remote file.
|
||||
* @since 2.0
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(IProgressMonitor, String, String, boolean)
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#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 {
|
||||
|
||||
File file = new File(remoteParent, remoteFile);
|
||||
OutputStream stream = null;
|
||||
|
|
|
@ -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.local.processes;
|
||||
|
@ -52,7 +52,7 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
|||
return LocalServiceResources.Local_Process_Service_Description;
|
||||
}
|
||||
|
||||
public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException
|
||||
public IHostProcess[] listAllProcesses(IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
IHostProcess[] processes = null;
|
||||
|
||||
|
@ -69,12 +69,12 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
|||
return processes;
|
||||
}
|
||||
|
||||
public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException
|
||||
public boolean kill(long PID, String signal, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
IHostProcess process = null;
|
||||
try
|
||||
{
|
||||
process = getProcess(monitor, PID);
|
||||
process = getProcess(PID, monitor);
|
||||
|
||||
// if there is no process, simply return true
|
||||
if (process == null) {
|
||||
|
|
|
@ -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.local.shells;
|
||||
|
@ -48,26 +48,26 @@ public class LocalShellService implements IShellService, ILocalService
|
|||
return LocalServiceResources.Local_Shell_Service_Description;
|
||||
}
|
||||
|
||||
public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment)
|
||||
public IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor)
|
||||
{
|
||||
String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
|
||||
return launchShell(monitor, initialWorkingDirectory, defaultEncoding, environment);
|
||||
return launchShell(initialWorkingDirectory, defaultEncoding, environment, monitor);
|
||||
}
|
||||
|
||||
public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment)
|
||||
public IHostShell launchShell(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor)
|
||||
{
|
||||
LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,SHELL_INVOCATION, encoding, environment);
|
||||
hostShell.run(monitor);
|
||||
return hostShell;
|
||||
}
|
||||
|
||||
public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String[] environment)
|
||||
public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment, IProgressMonitor monitor)
|
||||
{
|
||||
String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
|
||||
return runCommand(monitor, initialWorkingDirectory, command, defaultEncoding, environment);
|
||||
return runCommand(initialWorkingDirectory, command, defaultEncoding, 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)
|
||||
{
|
||||
LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,command, encoding, environment);
|
||||
hostShell.run(monitor);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* Martin Oberhuber (Wind River) - initial API and implementation
|
||||
* Dave Dykstal (IBM) - fixing bug 162510: correctly process filter strings
|
||||
* Kushal Munir (IBM) - for API bug
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.ssh.files;
|
||||
|
@ -241,7 +242,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return new RemoteFileIOException(e);
|
||||
}
|
||||
|
||||
public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
|
||||
public IHostFile getFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
//TODO getFile() must return a dummy even for non-existent files,
|
||||
//or the move() operation will fail. This needs to be described in
|
||||
|
@ -392,7 +393,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return "/"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
//TODO what to do with isBinary?
|
||||
ChannelSftp channel = null;
|
||||
|
@ -483,7 +484,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
}
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
//TODO hack for now
|
||||
try
|
||||
|
@ -500,7 +501,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
bos.write(buffer, 0, readCount);
|
||||
}
|
||||
bos.close();
|
||||
upload(monitor, tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding); //$NON-NLS-1$
|
||||
upload(tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding, monitor); //$NON-NLS-1$
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw makeSystemMessageException(e);
|
||||
|
@ -509,7 +510,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return true;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
ChannelSftp channel = null;
|
||||
try {
|
||||
|
@ -568,7 +569,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
String name = fUserHome.substring(lastSlash + 1);
|
||||
String parent = fUserHome.substring(0, lastSlash);
|
||||
try {
|
||||
return getFile(null, parent, name);
|
||||
return getFile(parent, name, null);
|
||||
} catch(SystemMessageException e) {
|
||||
//Could not determine user home
|
||||
//return new SftpHostFile(".",".",true,false,false,0,0); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
@ -581,7 +582,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return new IHostFile[] { root };
|
||||
}
|
||||
|
||||
public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
|
||||
public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
IHostFile result = null;
|
||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||
|
@ -605,7 +606,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return result;
|
||||
}
|
||||
|
||||
public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
|
||||
public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
IHostFile result = null;
|
||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||
|
@ -625,7 +626,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return result;
|
||||
}
|
||||
|
||||
public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
|
||||
public boolean delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
boolean ok=false;
|
||||
Activator.trace("SftpFileService.delete.waitForLock"); //$NON-NLS-1$
|
||||
|
@ -677,7 +678,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return ok;
|
||||
}
|
||||
|
||||
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 ok=false;
|
||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||
|
@ -699,7 +700,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
|
||||
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException {
|
||||
// TODO dont know how to update
|
||||
return rename(monitor, remoteParent, oldName, newName);
|
||||
return rename(remoteParent, oldName, newName, monitor);
|
||||
}
|
||||
|
||||
private boolean progressWorked(IProgressMonitor monitor, int work) {
|
||||
|
@ -766,7 +767,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return result;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
// move is not supported by sftp directly. Use the ssh shell instead.
|
||||
// TODO check if newer versions of sftp support move directly
|
||||
|
@ -779,7 +780,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return (rv==0);
|
||||
}
|
||||
|
||||
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 is not supported by sftp directly. Use the ssh shell instead.
|
||||
// TODO check if newer versions of sftp support copy directly
|
||||
// TODO Interpret some error messages like "command not found" (use (x)copy instead of cp on windows)
|
||||
|
@ -790,7 +791,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return (rv==0);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
Activator.trace("SftpFileService.copyBatch "+srcNames); //$NON-NLS-1$
|
||||
boolean ok = true;
|
||||
|
@ -798,7 +799,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
{
|
||||
//TODO check what should happen if one file throws an Exception
|
||||
//should the batch job continue?
|
||||
ok = ok && copy(monitor, srcParents[i], srcNames[i], tgtParent, srcNames[i]);
|
||||
ok = ok && copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -824,8 +825,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
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
|
||||
{
|
||||
boolean ok=false;
|
||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||
|
@ -844,8 +845,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
return ok;
|
||||
}
|
||||
|
||||
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 {
|
||||
boolean ok=false;
|
||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||
try {
|
||||
|
@ -880,9 +881,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
/**
|
||||
* Gets the input stream to access the contents of a remote file.
|
||||
* @since 2.0
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(IProgressMonitor, String, String, boolean)
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(String, String, boolean, IProgressMonitor)
|
||||
*/
|
||||
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 {
|
||||
|
||||
InputStream stream = null;
|
||||
|
||||
|
@ -905,9 +906,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
/**
|
||||
* Gets the output stream to write to a remote file.
|
||||
* @since 2.0
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(IProgressMonitor, String, String, boolean)
|
||||
* @see org.eclipse.rse.services.files.AbstractFileService#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 {
|
||||
|
||||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - Adapted from LocalShellService.
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.ssh.shell;
|
||||
|
@ -39,29 +40,29 @@ public class SshShellService implements ISshService, IShellService {
|
|||
}
|
||||
|
||||
//TODO abstract base class should handle default encodings
|
||||
public IHostShell launchShell(IProgressMonitor monitor,
|
||||
String initialWorkingDirectory, String[] environment) {
|
||||
public IHostShell launchShell(String initialWorkingDirectory,
|
||||
String[] environment, IProgressMonitor monitor) {
|
||||
String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
|
||||
return launchShell(monitor, initialWorkingDirectory, defaultEncoding, environment);
|
||||
return launchShell(initialWorkingDirectory, defaultEncoding, environment, monitor);
|
||||
}
|
||||
|
||||
public IHostShell launchShell(IProgressMonitor monitor,
|
||||
String initialWorkingDirectory, String encoding,
|
||||
String[] environment) {
|
||||
public IHostShell launchShell(String initialWorkingDirectory,
|
||||
String encoding, String[] environment,
|
||||
IProgressMonitor monitor) {
|
||||
SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, SshHostShell.SHELL_INVOCATION, encoding, environment);
|
||||
return hostShell;
|
||||
}
|
||||
|
||||
//TODO abstract base class should handle default encodings
|
||||
public IHostShell runCommand(IProgressMonitor monitor,
|
||||
String initialWorkingDirectory, String command, String[] environment) {
|
||||
public IHostShell runCommand(String initialWorkingDirectory,
|
||||
String command, String[] environment, IProgressMonitor monitor) {
|
||||
String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
|
||||
return runCommand(monitor, initialWorkingDirectory, command, defaultEncoding, environment);
|
||||
return runCommand(initialWorkingDirectory, command, defaultEncoding, 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) {
|
||||
SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, command, encoding, environment);
|
||||
return hostShell;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -32,17 +32,17 @@ public abstract class AbstractFileService implements IFileService
|
|||
public static final int FILE_TYPE_FILES = 1;
|
||||
public static final int FILE_TYPE_FOLDERS = 2;
|
||||
|
||||
public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException
|
||||
public IHostFile[] getFiles(String remoteParent, String fileFilter, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
return internalFetch(monitor, remoteParent, fileFilter, FILE_TYPE_FILES);
|
||||
}
|
||||
|
||||
public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException
|
||||
public IHostFile[] getFolders(String remoteParent, String fileFilter, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
return internalFetch(monitor, remoteParent, fileFilter, FILE_TYPE_FOLDERS);
|
||||
}
|
||||
|
||||
public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String parentPath, String fileFilter) throws SystemMessageException
|
||||
public IHostFile[] getFilesAndFolders(String parentPath, String fileFilter, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
return internalFetch(monitor, parentPath, fileFilter, FILE_TYPE_FILES_AND_FOLDERS);
|
||||
}
|
||||
|
@ -87,12 +87,12 @@ public abstract class AbstractFileService implements IFileService
|
|||
return null;
|
||||
}
|
||||
|
||||
public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException
|
||||
public boolean deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
boolean ok = true;
|
||||
for (int i = 0; i < remoteParents.length; i++)
|
||||
{
|
||||
ok = ok && delete(monitor, remoteParents[i], fileNames[i]);
|
||||
ok = ok && delete(remoteParents[i], fileNames[i], monitor);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -108,17 +108,17 @@ public abstract class AbstractFileService implements IFileService
|
|||
|
||||
/**
|
||||
* The default implementation returns <code>null</code>. Clients can override to return an input stream to the file.
|
||||
* @see org.eclipse.rse.services.files.IFileService#getInputStream(IProgressMonitor, String, String, boolean)
|
||||
* @see org.eclipse.rse.services.files.IFileService#getInputStream(String, String, boolean, IProgressMonitor)
|
||||
*/
|
||||
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 {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The default implementation returns <code>null</code>. 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;
|
||||
}
|
||||
}
|
|
@ -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 <code>true</code> if the file is a binary file, <code>false</code> 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 <code>true</code> if the file is a binary file, <code>false</code> 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;
|
||||
}
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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 <code>false</code> if the given process doesn't exist, else <code>true</code>.
|
||||
* 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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
|
@ -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.
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
// ----------------------------
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
|||
* <li>resolved objects for each filter string if user has elected NOT to show filter strings in his preferences
|
||||
* </ul>
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
return internalGetChildren(monitor, element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the children and then passes the children to the subsystem configuration adapter for filtering.
|
||||
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.rse.ui.view.IContextObject)
|
||||
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(org.eclipse.rse.ui.view.IContextObject, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IContextObject element) {
|
||||
Object[] children = getChildren(monitor, element.getModelObject());
|
||||
public Object[] getChildren(IContextObject element, IProgressMonitor monitor) {
|
||||
Object[] children = getChildren(element.getModelObject(), monitor);
|
||||
ISubSystem subsystem = element.getSubSystem();
|
||||
ISubSystemConfiguration configuration = subsystem.getSubSystemConfiguration();
|
||||
Object adapter = Platform.getAdapterManager().getAdapter(configuration, ISubSystemConfigurationAdapter.class);
|
||||
|
@ -400,11 +401,11 @@ public class SystemViewFilterReferenceAdapter
|
|||
|
||||
if (monitor == null)
|
||||
{
|
||||
allChildren = ss.resolveFilterStrings(new NullProgressMonitor(), filterStrings);
|
||||
allChildren = ss.resolveFilterStrings(filterStrings, new NullProgressMonitor());
|
||||
}
|
||||
else
|
||||
{
|
||||
allChildren = ss.resolveFilterStrings(monitor, filterStrings);
|
||||
allChildren = ss.resolveFilterStrings(filterStrings, monitor);
|
||||
}
|
||||
|
||||
if (allChildren == null)
|
||||
|
|
|
@ -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;
|
||||
|
@ -141,7 +142,7 @@ public class SystemViewFilterStringAdapter extends AbstractSystemViewAdapter
|
|||
* Return the children of this filter.
|
||||
* This returns an empty list.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -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.view;
|
||||
|
@ -336,11 +337,11 @@ public class SystemViewLabelAndContentProvider extends LabelProvider
|
|||
|
||||
if (object instanceof IContextObject)
|
||||
{
|
||||
children = adapter.getChildren(new NullProgressMonitor(), (IContextObject)object);
|
||||
children = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
|
||||
}
|
||||
else
|
||||
{
|
||||
children = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
|
||||
children = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -104,7 +105,7 @@ public class SystemViewMessageAdapter
|
|||
/**
|
||||
* Return the children of this object. Not applicable for us.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -104,7 +105,7 @@ public class SystemViewPromptableAdapter
|
|||
/**
|
||||
* Return the children of this object. Not applicable for us.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
// Note: Do _not_ call promptable.run(getShell()) here. It leads only to
|
||||
// senseless invocations of the new connection wizard dialog on refreshs!
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
|
||||
* 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;
|
||||
|
@ -109,7 +110,7 @@ public class SystemViewRootInputAdapter extends AbstractSystemViewAdapter
|
|||
/**
|
||||
* Return the children of this object
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
ISystemViewInputProvider provider = (ISystemViewInputProvider)element;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -109,7 +110,7 @@ public class SystemViewScratchpadAdapter extends AbstractSystemViewAdapter imple
|
|||
/**
|
||||
* Return the children of this object
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
SystemScratchpad pad = (SystemScratchpad)element;
|
||||
return pad.getChildren();
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
||||
* 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 SystemViewSubSystemAdapter extends AbstractSystemViewAdapter
|
|||
/**
|
||||
* Return the children of this object
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
//System.out.println("INSIDE GETCHILDREN FOR SUBSYSTEM VIEW ADAPTER: "+element);
|
||||
ISubSystem ss = (ISubSystem)element;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* 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.ui.view.monitor;
|
||||
|
@ -143,7 +144,7 @@ FocusListener
|
|||
{
|
||||
public IStatus run(IProgressMonitor monitor)
|
||||
{
|
||||
Object[] children = _adapter.getChildren(monitor, (IAdaptable)_inputObject);
|
||||
Object[] children = _adapter.getChildren((IAdaptable)_inputObject, monitor);
|
||||
if (children != null)
|
||||
{
|
||||
SystemTableViewProvider provider = (SystemTableViewProvider)_viewer.getContentProvider();
|
||||
|
|
|
@ -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.scratchpad;
|
||||
|
@ -146,11 +146,11 @@ public class SystemScratchpadViewProvider implements ILabelProvider, ITreeConten
|
|||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2003, 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.search;
|
||||
|
@ -56,7 +56,7 @@ public class SystemSearchViewContentProvider implements ITreeContentProvider {
|
|||
return null;
|
||||
}
|
||||
else {
|
||||
return adapter.getChildren(new NullProgressMonitor(), (IAdaptable)parentElement);
|
||||
return adapter.getChildren((IAdaptable)parentElement, new NullProgressMonitor());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class SystemSearchViewContentProvider implements ITreeContentProvider {
|
|||
return null;
|
||||
}
|
||||
else {
|
||||
return adapter.getChildren(new NullProgressMonitor(), (IAdaptable)inputElement);
|
||||
return adapter.getChildren((IAdaptable)inputElement, new NullProgressMonitor());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
||||
* 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.team;
|
||||
|
@ -139,7 +140,7 @@ public class SystemTeamViewCategoryAdapter
|
|||
/**
|
||||
* Return the children of this profile.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
|
||||
ISystemProfile profile = category.getProfile();
|
||||
|
|
|
@ -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.view.team;
|
||||
|
@ -67,7 +68,7 @@ public class SystemTeamViewContentProvider extends WorkbenchContentProvider
|
|||
{
|
||||
ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
|
||||
if (adapter != null)
|
||||
children = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)element);
|
||||
children = adapter.getChildren((IAdaptable)element, new NullProgressMonitor());
|
||||
else
|
||||
children = super.getChildren(element);
|
||||
}
|
||||
|
|
|
@ -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.ui.view.team;
|
||||
|
@ -213,7 +214,7 @@ public class SystemTeamViewProfileAdapter
|
|||
/**
|
||||
* Return the children of this profile.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
ISystemProfile profile = (ISystemProfile)element;
|
||||
return getCategoryChildren(profile);
|
||||
|
|
|
@ -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.team;
|
||||
|
@ -166,7 +167,7 @@ public class SystemTeamViewSubSystemConfigurationAdapter
|
|||
/**
|
||||
* Return the children of this profile.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||
{
|
||||
SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
|
||||
SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
|
||||
|
|
|
@ -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.ui.actions;
|
||||
|
@ -109,7 +110,7 @@ public class SystemCopyToClipboardAction extends SystemBaseAction implements IV
|
|||
{
|
||||
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];
|
||||
|
|
|
@ -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.ui.operations;
|
||||
|
@ -206,11 +206,11 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
|
|||
Object[] children = null;
|
||||
if (_remoteObject instanceof IContextObject)
|
||||
{
|
||||
children = _adapter.getChildren(monitor, (IContextObject)_remoteObject);
|
||||
children = _adapter.getChildren((IContextObject)_remoteObject, monitor);
|
||||
}
|
||||
else
|
||||
{
|
||||
children = _adapter.getChildren(monitor, (IAdaptable)_remoteObject);
|
||||
children = _adapter.getChildren((IAdaptable)_remoteObject, monitor);
|
||||
}
|
||||
_collector.add(children, monitor);
|
||||
monitor.done();
|
||||
|
|
|
@ -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) - [182454] improve getAbsoluteName() documentation
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.view;
|
||||
|
@ -488,7 +489,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
|||
*/
|
||||
public final Object[] getChildren(Object object)
|
||||
{
|
||||
return getChildren(new NullProgressMonitor(), (IAdaptable)object);
|
||||
return getChildren((IAdaptable)object, new NullProgressMonitor());
|
||||
}
|
||||
|
||||
|
||||
|
@ -496,12 +497,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
|||
* This should be overridden by subclasses in order to provide
|
||||
* deferred query support via the Eclipse Jobs mechanism
|
||||
* Return the children of this object. Return null if children not supported.
|
||||
*
|
||||
* @param monitor the progress monitor
|
||||
* @param element the model object to get children from
|
||||
* @param monitor the progress monitor
|
||||
*
|
||||
* @return the children of element
|
||||
*/
|
||||
public abstract Object[] getChildren(IProgressMonitor monitor, IAdaptable element);
|
||||
public abstract Object[] getChildren(IAdaptable element, IProgressMonitor monitor);
|
||||
|
||||
/**
|
||||
* This should be overridden by subclasses in order to provide
|
||||
|
@ -511,14 +512,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
|||
*
|
||||
* This method should be overridden if your adapter supports context objects. If not, this will
|
||||
* fall back to the model object version of the method.
|
||||
*
|
||||
* @param monitor the progress monitor
|
||||
* @param element the context object that wrappers a model object, it's subsystem and filter reference
|
||||
*
|
||||
* @return the children of the model object within the context object that matches the containing filter reference criteria
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IContextObject element)
|
||||
public Object[] getChildren(IContextObject element, IProgressMonitor monitor)
|
||||
{
|
||||
return getChildren(monitor, element.getModelObject());
|
||||
return getChildren(element.getModelObject(), monitor);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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.ui.view;
|
||||
|
@ -178,31 +178,29 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD
|
|||
|
||||
/**
|
||||
* Return the children of this model object.
|
||||
*
|
||||
* @param monitor the progress monitor
|
||||
* @param element the model object to query
|
||||
* @param monitor the progress monitor
|
||||
*
|
||||
* @return the children of element
|
||||
*
|
||||
* The implementation needs to take this into
|
||||
* account so that SWT thread exceptions are avoided.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element);
|
||||
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor);
|
||||
|
||||
/**
|
||||
* Return the children of this object. When a contextObject is passed in
|
||||
* instead of an adaptable model object, the adapter needs handle both the model object
|
||||
* as well as the associated filter.
|
||||
*
|
||||
* @param monitor the progress monitor
|
||||
* @param contextObject a wrapper object that contains the model object plus context information
|
||||
* @param monitor the progress monitor
|
||||
*
|
||||
* @return the children of the model object in contextObject that matches the filter in contextObject
|
||||
*
|
||||
* The implementation needs to take this into
|
||||
* account so that SWT thread exceptions are avoided.
|
||||
*/
|
||||
public Object[] getChildren(IProgressMonitor monitor, IContextObject contextObject);
|
||||
public Object[] getChildren(IContextObject contextObject, IProgressMonitor monitor);
|
||||
|
||||
/**
|
||||
* Return the children of this object, using the given Expand-To filter
|
||||
|
|
|
@ -21,6 +21,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.ui.internal.model;
|
||||
|
@ -906,15 +907,12 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
|
||||
profile, oldName);
|
||||
}
|
||||
/**
|
||||
* 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
|
||||
* @return new SystemProfile object
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.ISystemRegistry#copySystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
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
|
||||
{
|
||||
Exception lastExc = null;
|
||||
boolean failed = false;
|
||||
|
@ -2568,7 +2566,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.ISystemRegistry#copyHost(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
|
||||
*/
|
||||
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
|
||||
{
|
||||
Exception lastExc = null;
|
||||
boolean failed = false;
|
||||
|
@ -2655,12 +2653,12 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.ISystemRegistry#moveHost(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
|
||||
*/
|
||||
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
|
||||
{
|
||||
IHost newConn = null;
|
||||
try
|
||||
{
|
||||
newConn = copyHost(monitor, conn, targetProfile, newName);
|
||||
newConn = copyHost(conn, targetProfile, newName, monitor);
|
||||
if (newConn != null)
|
||||
{
|
||||
deleteHost(conn); // delete old connection now that new one created successfully
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
||||
* 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;
|
||||
|
@ -1576,7 +1577,7 @@ public abstract class SubSystem extends RSEModelObject
|
|||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||
IStatus result = Status.OK_STATUS;
|
||||
try {
|
||||
connect(false);
|
||||
connect(monitor, false);
|
||||
} catch (InterruptedException e) {
|
||||
result = Status.CANCEL_STATUS;
|
||||
} catch (Exception e) {
|
||||
|
@ -1989,98 +1990,6 @@ public abstract class SubSystem extends RSEModelObject
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve an <i>absolute</i> 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.
|
||||
* <p>
|
||||
* When a user <u>expands a filter</u> 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.
|
||||
* <p>
|
||||
* The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
|
||||
* There are <u>two requirements</u> on the returned objects:</p>
|
||||
* <ol>
|
||||
* <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
|
||||
* <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
|
||||
* for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystem#isHidden() visible}
|
||||
* in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
|
||||
* with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
|
||||
* </ol>
|
||||
* <p>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}.
|
||||
* <p>
|
||||
* Be sure to register your adapter factory in your plugin's startup method.
|
||||
* <p>
|
||||
* <b>You do not need to override this, as it does the progress monitor and error message
|
||||
* displaying for you. Just override internalResolveFilterString.</b>
|
||||
* <p>
|
||||
* @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().
|
||||
* <p>
|
||||
* This is the same as {@link #resolveFilterString(String)} but takes an array of
|
||||
* filter strings versus a single filter string.
|
||||
* <p>
|
||||
* The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}.
|
||||
* <p>
|
||||
* 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 <i>absolute</i> 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.
|
||||
* <p>
|
||||
* When a user expands a filter containing filter strings, this method is
|
||||
* invoked for each filter string.
|
||||
* When a user <u>expands a filter</u> 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.
|
||||
* <p>
|
||||
* 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 <u>two requirements</u> on the returned objects:</p>
|
||||
* <ol>
|
||||
* <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
|
||||
* <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
|
||||
* for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystem#isHidden() visible}
|
||||
* in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
|
||||
* with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
|
||||
* </ol>
|
||||
* <p>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}.
|
||||
* <p>
|
||||
* Be sure to register your adapter factory in your plugin's startup method.
|
||||
* <p>
|
||||
* <b>You do not need to override this, as it does the progress monitor and error message
|
||||
* displaying for you. Just override internalResolveFilterString.</b>
|
||||
* <p>
|
||||
* 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().
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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[])}.
|
||||
* <p>
|
||||
* 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().
|
||||
* <p>
|
||||
* When a user expands a filter containing filter strings, this method is
|
||||
* invoked for each filter string.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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 <i>relative</i> filter string.
|
||||
* <p>
|
||||
|
@ -2269,29 +2145,30 @@ public abstract class SubSystem extends RSEModelObject
|
|||
* <p>
|
||||
* @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.
|
||||
* <p>
|
||||
* 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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue