mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +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:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - adapted template for daytime example.
|
* Martin Oberhuber (Wind River) - adapted template for daytime example.
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.examples.daytime.model;
|
||||||
|
@ -73,7 +74,7 @@ public class DaytimeResourceAdapter extends AbstractSystemViewAdapter implements
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element) {
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package samples.model;
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package samples.model;
|
package samples.model;
|
||||||
|
@ -104,7 +105,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
|
* @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();
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package samples.ui.actions;
|
package samples.ui.actions;
|
||||||
|
@ -141,7 +142,7 @@ public class ShowJarContents implements IObjectActionDelegate
|
||||||
environment[0] = "AAA=BBB"; //$NON-NLS-1$
|
environment[0] = "AAA=BBB"; //$NON-NLS-1$
|
||||||
String initialWorkingDirectory = "."; //$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.addOutputListener(new StdOutOutputListener());
|
||||||
//hostShell.writeToShell("pwd"); //$NON-NLS-1$
|
//hostShell.writeToShell("pwd"); //$NON-NLS-1$
|
||||||
//hostShell.writeToShell("echo ${AAA}"); //$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
|
public void runCommandInvisibly(IRemoteCmdSubSystem cmdss, String command) throws Exception
|
||||||
{
|
{
|
||||||
command = command + cmdss.getParentRemoteCmdSubSystemConfiguration().getCommandSeparator() + "exit"; //$NON-NLS-1$
|
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) {
|
if (result.length>0 && result[0] instanceof IRemoteCommandShell) {
|
||||||
IRemoteCommandShell cs = (IRemoteCommandShell)result[0];
|
IRemoteCommandShell cs = (IRemoteCommandShell)result[0];
|
||||||
while (cs.isActive()) {
|
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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Ewa Matejska (PalmSource) - Adapted from LocalRunLaunchDelegate
|
* 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()
|
public void run()
|
||||||
{ try {
|
{ try {
|
||||||
subsystem.connect(false);
|
subsystem.connect(false, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
@ -247,8 +248,8 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
||||||
File file = new File(localExePath);
|
File file = new File(localExePath);
|
||||||
Path remotePath = new Path(remoteExePath);
|
Path remotePath = new Path(remoteExePath);
|
||||||
try {
|
try {
|
||||||
fileService.upload(new NullProgressMonitor(), file, remotePath.removeLastSegments(1).toString(),
|
fileService.upload(file, remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(),
|
||||||
remotePath.lastSegment(), true, null, null);
|
true, null, null, new NullProgressMonitor());
|
||||||
// Need to change the permissions to match the original file permissions because of a bug in upload
|
// 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$
|
Process p = remoteShellExec(config, "chmod", "+x " + spaceEscapify(remotePath.toString())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
Thread.sleep(500);
|
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.
|
// This is necessary because runCommand does not actually run the command right now.
|
||||||
String env[] = new String[0];
|
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);
|
hostShell.writeToShell(remote_command);
|
||||||
|
|
||||||
Process p = null;
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.connectorservice.dstore;
|
package org.eclipse.rse.internal.connectorservice.dstore;
|
||||||
|
@ -822,12 +822,12 @@ public class RexecDstoreServer implements IServerLauncher
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the remote server.
|
* 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 connectPort the port to use for launching the server
|
||||||
|
* @param monitor a monitor for showing progress
|
||||||
|
* @see #getErrorMessage()
|
||||||
* @return Anything you want.
|
* @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));
|
clientConnection.setPort(Integer.toString(connectPort));
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
package org.eclipse.rse.core.model;
|
||||||
|
@ -221,13 +222,13 @@ public interface ISystemRegistry extends ISchedulingRule {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy a SystemProfile. All connections connection data is copied.
|
* 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 profile Source profile to copy
|
||||||
* @param newName Unique name to give copied profile
|
* @param newName Unique name to give copied profile
|
||||||
* @param makeActive whether to make the copied profile active or not
|
* @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
|
* @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
|
* 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.
|
* 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 conn The connection to copy
|
||||||
* @param targetProfile What profile to copy into
|
* @param targetProfile What profile to copy into
|
||||||
* @param newName Unique name to give copied profile
|
* @param newName Unique name to give copied profile
|
||||||
|
* @param monitor Progress monitor to reflect each step of the operation
|
||||||
* @return new SystemConnection object
|
* @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.
|
* Move a SystemConnection to another profile.
|
||||||
* All subsystems are moved, and all connection data is moved.
|
* All subsystems are moved, and all connection data is moved.
|
||||||
* This is actually accomplished by doing a copy operation first,
|
* This is actually accomplished by doing a copy operation first,
|
||||||
* and if successful deleting the original.
|
* and if successful deleting the original.
|
||||||
* @param monitor Progress monitor to reflect each step of the operation
|
|
||||||
* @param conn The connection to move
|
* @param conn The connection to move
|
||||||
* @param targetProfile What profile to move into
|
* @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
|
* @param newName Unique name to give copied profile. Typically this is the same as the original name, but
|
||||||
* will be different on name collisions
|
* will be different on name collisions
|
||||||
|
* @param monitor Progress monitor to reflect each step of the operation
|
||||||
* @return new SystemConnection object
|
* @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.
|
* 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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.core.subsystems;
|
package org.eclipse.rse.core.subsystems;
|
||||||
|
@ -74,12 +74,12 @@ public interface IServerLauncher {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the remote server.
|
* 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 connectPort the port to use for launching the server
|
||||||
|
* @param monitor a monitor for showing progress
|
||||||
|
* @see #getErrorMessage()
|
||||||
* @return Anything you want.
|
* @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
|
* Disconnect from the remote server
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.core.subsystems;
|
package org.eclipse.rse.core.subsystems;
|
||||||
|
@ -362,60 +363,37 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
|
||||||
*/
|
*/
|
||||||
public void connect() throws Exception;
|
public void connect() throws Exception;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the remote system, optionally forcing a signon prompt even if the password
|
* Synchronously connect to the remote system.
|
||||||
* is cached in memory or on disk.
|
|
||||||
*
|
*
|
||||||
* @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
|
* Clients are expected to call this method on a background
|
||||||
* in memory.
|
* 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)}
|
* The framework will take care of switching to the UI thread
|
||||||
*/
|
* for requesting a password from the user if necessary.
|
||||||
public void connect(boolean forcePrompt) 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>.
|
||||||
*
|
|
||||||
* @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 forcePrompt forces the prompt dialog to be displayed
|
* @param forcePrompt forces the prompt dialog to be displayed
|
||||||
* even if the password is currently in memory.
|
* even if the password is currently in memory.
|
||||||
*/
|
*/
|
||||||
public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception;
|
public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the remote system on a background job. The callback is
|
* Asynchronously connect to the remote system.
|
||||||
* called when the connect is complete.
|
|
||||||
*
|
*
|
||||||
* @param callback to call after connect is complete
|
* An Eclipse background job with a progress monitor will
|
||||||
* @throws Exception
|
* be created automatically. If the optional callback is
|
||||||
*/
|
* given, will be called when the connect is complete.
|
||||||
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.
|
|
||||||
*
|
*
|
||||||
* @param forcePrompt forces the prompt dialog even if the password is in mem
|
* @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
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void connect(boolean forcePrompt, IRSECallback callback) throws Exception;
|
public void connect(boolean forcePrompt, IRSECallback callback) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from the remote system.
|
* Disconnect from the remote system.
|
||||||
* In addition to calling getSystem().disconnect(),this must fire an
|
* 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;
|
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
|
* Resolve an absolute filter string. This is only applicable if the subsystem
|
||||||
* factory reports true for supportsFilters().
|
* factory reports true for supportsFilters().
|
||||||
* <p>
|
* <p>
|
||||||
* When a user expands a filter containing filter strings, this method is
|
* When a user expands a filter containing filter strings, this method is
|
||||||
* invoked for each filter string.
|
* invoked for each filter string.
|
||||||
* <p>
|
* <p>
|
||||||
* The resulting objects are displayed in the remote system view tree. They
|
* 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
|
* 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
|
* drive the property sheet. You can just defer the getAdapter request to
|
||||||
* the platform's Adapter manager if desired.
|
* the platform's Adapter manager if desired.
|
||||||
* <p>
|
* <p>
|
||||||
* You should supply an adapter class for the returned object's class,
|
* 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
|
* to render objects in the Remote System Explorer view. It will uses a
|
||||||
* label and content provider that defers all requests to the adapter,
|
* label and content provider that defers all requests to the adapter,
|
||||||
* which it gets by querying the platform's adapter manager for the object
|
* which it gets by querying the platform's adapter manager for the object
|
||||||
* type. Be sure to register your adapter factory.
|
* 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.
|
|
||||||
*
|
*
|
||||||
* @param filterString filter pattern for objects to return.
|
* @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
|
* @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
|
* 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.
|
* filter strings versus a single filter string.
|
||||||
*
|
*
|
||||||
* @param filterStrings array of filter patterns for objects to return.
|
* @param filterStrings array of filter patterns for objects to return.
|
||||||
* @return Array of objects that are the result of resolving all the filter strings
|
* @param monitor the process monitor associated with this operation
|
||||||
*
|
*
|
||||||
* @deprecated use resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) instead
|
* @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().
|
* factory reports true for supportsFilters().
|
||||||
* <p>
|
* <p>
|
||||||
* When a user expands an object that came from a previous filter string expansion,
|
* 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 parent Object that is being expanded.
|
||||||
* @param filterString filter pattern for children of parent.
|
* @param filterString filter pattern for children of parent.
|
||||||
* @return Array of objects that are the result of this filter string
|
* @param monitor the process monitor associated with this operation
|
||||||
*
|
*
|
||||||
* @deprecated use resolveFilterString(IProgressMonitor monitor, String filterString) instead
|
* @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
|
* 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,
|
* - Fix early startup issues by deferring FileStore evaluation and classloading,
|
||||||
* - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
|
* - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
|
||||||
* - Also remove unnecessary class RSEFileCache and obsolete branding files.
|
* - 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;
|
package org.eclipse.rse.internal.eclipse.filesystem;
|
||||||
|
@ -335,7 +336,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
|
|
||||||
if (subSys instanceof FileServiceSubSystem) {
|
if (subSys instanceof FileServiceSubSystem) {
|
||||||
FileServiceSubSystem fileServiceSubSystem = ((FileServiceSubSystem)subSys);
|
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();
|
IRemoteFileSubSystemConfiguration config = subSys.getParentRemoteFileSubSystemConfiguration();
|
||||||
RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
|
RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
|
||||||
filterString.setShowFiles(true);
|
filterString.setShowFiles(true);
|
||||||
|
@ -410,7 +411,7 @@ public class RSEFileStoreImpl extends FileStore
|
||||||
|
|
||||||
if (subSys instanceof FileServiceSubSystem) {
|
if (subSys instanceof FileServiceSubSystem) {
|
||||||
FileServiceSubSystem fileServiceSubSystem = ((FileServiceSubSystem)subSys);
|
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();
|
IRemoteFileSubSystemConfiguration config = subSys.getParentRemoteFileSubSystemConfiguration();
|
||||||
RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
|
RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
|
||||||
filterString.setShowFiles(true);
|
filterString.setShowFiles(true);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* 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) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.resources;
|
package org.eclipse.rse.files.ui.resources;
|
||||||
|
@ -1087,7 +1088,7 @@ public class UniversalFileTransferUtility
|
||||||
if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
|
if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
|
||||||
{
|
{
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
|
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))
|
if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
|
||||||
{
|
{
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
|
SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
|
||||||
targetFS.setLastModified(monitor, copiedFile, properties.getRemoteFileTimeStamp());
|
targetFS.setLastModified(copiedFile, properties.getRemoteFileTimeStamp(), monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return copiedFile;
|
return copiedFile;
|
||||||
|
@ -1484,7 +1485,7 @@ public class UniversalFileTransferUtility
|
||||||
if (source instanceof IFile)
|
if (source instanceof IFile)
|
||||||
{
|
{
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(source);
|
SystemIFileProperties properties = new SystemIFileProperties(source);
|
||||||
target.getParentRemoteFileSubSystem().setLastModified(monitor, target, properties.getRemoteFileTimeStamp());
|
target.getParentRemoteFileSubSystem().setLastModified(target, properties.getRemoteFileTimeStamp(), monitor);
|
||||||
}
|
}
|
||||||
else if (source instanceof IContainer)
|
else if (source instanceof IContainer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.propertypages;
|
package org.eclipse.rse.internal.files.ui.propertypages;
|
||||||
|
@ -449,7 +450,7 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getRemoteFile().getParentRemoteFileSubSystem().setReadOnly(new NullProgressMonitor(), getRemoteFile(), readOnlySelected);
|
getRemoteFile().getParentRemoteFileSubSystem().setReadOnly(getRemoteFile(), readOnlySelected, new NullProgressMonitor());
|
||||||
RSEUIPlugin.getTheSystemRegistry().fireEvent(
|
RSEUIPlugin.getTheSystemRegistry().fireEvent(
|
||||||
new org.eclipse.rse.core.events.SystemResourceChangeEvent(
|
new org.eclipse.rse.core.events.SystemResourceChangeEvent(
|
||||||
getRemoteFile(),ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,null));
|
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) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
package org.eclipse.rse.internal.files.ui.view;
|
||||||
|
@ -580,7 +581,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
* Return the children of this object.
|
* Return the children of this object.
|
||||||
* If this is a folder or root, we list all child folders and files.
|
* 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);
|
return internalGetChildren(monitor, element, null);
|
||||||
}
|
}
|
||||||
|
@ -589,7 +590,7 @@ public class SystemViewRemoteFileAdapter
|
||||||
* Return the children of this object.
|
* Return the children of this object.
|
||||||
* If this is a folder or root, we list all child folders and files.
|
* 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());
|
return internalGetChildren(monitor, context.getModelObject(), context.getFilterReference());
|
||||||
}
|
}
|
||||||
|
@ -716,11 +717,11 @@ public class SystemViewRemoteFileAdapter
|
||||||
if (monitor != null)
|
if (monitor != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
children = ss.resolveFilterString(monitor, file, filter);
|
children = ss.resolveFilterString(file, filter, monitor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
children = ss.resolveFilterString(new NullProgressMonitor(), file, filter);
|
children = ss.resolveFilterString(file, filter, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((children == null) || (children.length == 0))
|
if ((children == null) || (children.length == 0))
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemOutputRemoteTypes
|
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemOutputRemoteTypes
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.view;
|
package org.eclipse.rse.internal.files.ui.view;
|
||||||
|
@ -235,7 +236,7 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt
|
||||||
/**
|
/**
|
||||||
* Returns nothing
|
* Returns nothing
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.view;
|
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
|
* 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) {
|
if (element instanceof IHostSearchResultSet) {
|
||||||
IHostSearchResultSet output = (IHostSearchResultSet)element;
|
IHostSearchResultSet output = (IHostSearchResultSet)element;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
package org.eclipse.rse.internal.importexport.files;
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2007 IBM Corporation and others.
|
* Copyright (c) 2000, 2007 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
@ -9,7 +7,10 @@ package org.eclipse.rse.internal.importexport.files;
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* 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.File;
|
||||||
import java.io.FileFilter;
|
import java.io.FileFilter;
|
||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
||||||
|
@ -320,7 +321,7 @@ public class UniFilePlus extends File {
|
||||||
if (time < 0) throw new IllegalArgumentException();
|
if (time < 0) throw new IllegalArgumentException();
|
||||||
try {
|
try {
|
||||||
IProgressMonitor monitor = new NullProgressMonitor();
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
ok = remoteFile.getParentRemoteFileSubSystem().setLastModified(monitor, remoteFile, time);
|
ok = remoteFile.getParentRemoteFileSubSystem().setLastModified(remoteFile, time, monitor);
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
||||||
|
@ -332,7 +333,7 @@ public class UniFilePlus extends File {
|
||||||
public boolean setReadOnly() {
|
public boolean setReadOnly() {
|
||||||
boolean ok = false;
|
boolean ok = false;
|
||||||
try {
|
try {
|
||||||
ok = remoteFile.getParentRemoteFileSubSystem().setReadOnly(new NullProgressMonitor(), remoteFile, true);
|
ok = remoteFile.getParentRemoteFileSubSystem().setReadOnly(remoteFile, true, new NullProgressMonitor());
|
||||||
} catch (RemoteFileException exc) {
|
} catch (RemoteFileException exc) {
|
||||||
Exception e = exc.getRemoteException();
|
Exception e = exc.getRemoteException();
|
||||||
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.internal.processes.ui.view;
|
||||||
|
@ -161,7 +162,7 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
IRemoteProcess process = (IRemoteProcess) element;
|
IRemoteProcess process = (IRemoteProcess) element;
|
||||||
IRemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Kevin Doyle (IBM) - Fix 183870 - Display File Exists Error
|
* 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;
|
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,
|
public boolean upload(InputStream inputStream, String remoteParent, String remoteFile, boolean isBinary,
|
||||||
boolean isBinary, String hostEncoding)
|
String hostEncoding, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
BufferedInputStream bufInputStream = null;
|
BufferedInputStream bufInputStream = null;
|
||||||
|
|
||||||
|
@ -343,8 +343,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean upload(IProgressMonitor monitor, File file, String remoteParent, String remoteFile,
|
public boolean upload(File file, String remoteParent, String remoteFile, boolean isBinary,
|
||||||
boolean isBinary, String srcEncoding, String hostEncoding)
|
String srcEncoding, String hostEncoding, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
FileInputStream inputStream = null;
|
FileInputStream inputStream = null;
|
||||||
BufferedInputStream bufInputStream = 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 the file is empty, create new empty file on host
|
||||||
if (totalBytes == 0)
|
if (totalBytes == 0)
|
||||||
{
|
{
|
||||||
IHostFile created = createFile(monitor, remoteParent, remoteFile);
|
IHostFile created = createFile(remoteParent, remoteFile, monitor);
|
||||||
return created.exists();
|
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,
|
public boolean download(String remoteParent, String remoteFile, File localFile, boolean isBinary,
|
||||||
boolean isBinary, String encoding) throws SystemMessageException
|
String encoding, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
DataElement universaltemp = getMinerElement();
|
DataElement universaltemp = getMinerElement();
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
|
if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
|
||||||
{
|
{
|
||||||
// need to refetch
|
// need to refetch
|
||||||
DStoreHostFile hostFile = (DStoreHostFile)getFile(monitor, remoteParent, remoteFile);
|
DStoreHostFile hostFile = (DStoreHostFile)getFile(remoteParent, remoteFile, monitor);
|
||||||
de = hostFile._element;
|
de = hostFile._element;
|
||||||
}
|
}
|
||||||
long fileLength = DStoreHostFile.getFileLength(de.getSource());
|
long fileLength = DStoreHostFile.getFileLength(de.getSource());
|
||||||
|
@ -715,7 +715,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name)
|
public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
DataElement de = null;
|
DataElement de = null;
|
||||||
if (name.equals(".") && name.equals(remoteParent)) //$NON-NLS-1$
|
if (name.equals(".") && name.equals(remoteParent)) //$NON-NLS-1$
|
||||||
|
@ -822,10 +822,10 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
|
|
||||||
public IHostFile getUserHome()
|
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;
|
String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
|
||||||
DataElement de = getElementFor(remotePath);
|
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;
|
String remotePath = remoteParent + getSeparator(remoteParent) + folderName;
|
||||||
DataElement de = getElementFor(remotePath);
|
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;
|
String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
|
||||||
DataElement de = getElementFor(remotePath);
|
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);
|
ArrayList dataElements = new ArrayList(remoteParents.length);
|
||||||
for (int i = 0; i < remoteParents.length; i++)
|
for (int i = 0; i < remoteParents.length; i++)
|
||||||
|
@ -903,7 +903,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
else return true;
|
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;
|
String remotePath = remoteParent + getSeparator(remoteParent) + oldName;
|
||||||
DataElement de = getElementFor(remotePath);
|
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
|
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;
|
String newPath = remoteParent + getSeparator(remoteParent) + newName;
|
||||||
oldFile.renameTo(newPath);
|
oldFile.renameTo(newPath);
|
||||||
return retVal;
|
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 src = srcParent + getSeparator(srcParent) + srcName;
|
||||||
// String tgt = tgtParent + getSeparator(tgtParent) + tgtName;
|
// String tgt = tgtParent + getSeparator(tgtParent) + tgtName;
|
||||||
// boolean isVirtual = ArchiveHandlerManager.isVirtual(src) || ArchiveHandlerManager.isVirtual(tgt);
|
// boolean isVirtual = ArchiveHandlerManager.isVirtual(src) || ArchiveHandlerManager.isVirtual(tgt);
|
||||||
//if (isVirtual || isArchive)
|
//if (isVirtual || isArchive)
|
||||||
{
|
{
|
||||||
if (copy(monitor, srcParent, srcName, tgtParent, tgtName))
|
if (copy(srcParent, srcName, tgtParent, tgtName, monitor))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
delete(monitor, srcParent, srcName);
|
delete(srcParent, srcName, monitor);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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();
|
DataStore ds = getDataStore();
|
||||||
String srcRemotePath = srcParent + getSeparator(srcParent) + srcName;
|
String srcRemotePath = srcParent + getSeparator(srcParent) + srcName;
|
||||||
|
@ -1096,7 +1096,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
return false;
|
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();
|
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);
|
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);
|
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);
|
return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_ALL);
|
||||||
}
|
}
|
||||||
|
@ -1229,8 +1229,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setLastModified(IProgressMonitor monitor, String parent,
|
public boolean setLastModified(String parent, String name,
|
||||||
String name, long timestamp) throws SystemMessageException
|
long timestamp, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String remotePath = parent + getSeparator(parent) + name;
|
String remotePath = parent + getSeparator(parent) + name;
|
||||||
DataElement de = getElementFor(remotePath);
|
DataElement de = getElementFor(remotePath);
|
||||||
|
@ -1249,8 +1249,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setReadOnly(IProgressMonitor monitor, String parent,
|
public boolean setReadOnly(String parent, String name,
|
||||||
String name, boolean readOnly) throws SystemMessageException
|
boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
String remotePath = parent + getSeparator(parent) + name;
|
String remotePath = parent + getSeparator(parent) + name;
|
||||||
DataElement de = getElementFor(remotePath);
|
DataElement de = getElementFor(remotePath);
|
||||||
|
@ -1308,7 +1308,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#getInputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
|
* @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;
|
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
|
||||||
int mode;
|
int mode;
|
||||||
|
@ -1328,7 +1328,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
|
* @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;
|
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
|
||||||
int mode;
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.dstore.processes;
|
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;
|
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())
|
if (!isInitialized())
|
||||||
{
|
{
|
||||||
|
@ -183,14 +183,14 @@ public class DStoreProcessService extends AbstractProcessService implements IPro
|
||||||
return _statusMonitor;
|
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
|
try
|
||||||
{
|
{
|
||||||
DataStore ds = getDataStore();
|
DataStore ds = getDataStore();
|
||||||
|
|
||||||
// run kill command on host
|
// 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 there is no process, simply return true
|
||||||
if (process == null) {
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.dstore.search;
|
package org.eclipse.rse.internal.services.dstore.search;
|
||||||
|
@ -52,7 +52,7 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc
|
||||||
return UniversalFileSystemMiner.MINER_ID;
|
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();
|
DStoreHostFile searchTarget = (DStoreHostFile) searchConfig.getSearchTarget();
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc
|
||||||
return argList;
|
return argList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig)
|
public void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
|
DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
|
||||||
DataElement status = config.getStatusObject();
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.dstore.shells;
|
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.IHostShell;
|
||||||
import org.eclipse.rse.services.shells.IShellService;
|
import org.eclipse.rse.services.shells.IShellService;
|
||||||
|
|
||||||
|
|
||||||
public class DStoreShellService extends AbstractDStoreService implements IShellService
|
public class DStoreShellService extends AbstractDStoreService implements IShellService
|
||||||
{
|
{
|
||||||
protected String[] _envVars;
|
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())
|
if (!isInitialized())
|
||||||
{
|
{
|
||||||
waitForInitialize(null);
|
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())
|
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$
|
return new DStoreHostShell(getStatusMonitor(getDataStore()), getDataStore(), initialWorkingDirectory, ">", encoding, environment); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command,
|
public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment,
|
||||||
String[] environment)
|
IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
if (!isInitialized())
|
if (!isInitialized())
|
||||||
{
|
{
|
||||||
waitForInitialize(null);
|
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,
|
public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding,
|
||||||
String encoding, String[] environment)
|
String[] environment, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
if (!isInitialized())
|
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 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 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
|
* 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;
|
package org.eclipse.rse.internal.services.files.ftp;
|
||||||
|
@ -417,7 +418,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#getFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
|
* @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!=null){
|
||||||
if (monitor.isCanceled()) {
|
if (monitor.isCanceled()) {
|
||||||
|
@ -567,7 +568,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
* (non-Javadoc)
|
* (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)
|
* @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;
|
boolean retValue = true;
|
||||||
|
|
||||||
|
@ -639,7 +640,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
* (non-Javadoc)
|
* (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)
|
* @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;
|
boolean retValue = true;
|
||||||
|
|
||||||
|
@ -667,7 +668,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
|
|
||||||
if(retValue == true){
|
if(retValue == true){
|
||||||
setFileType(isBinary);
|
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)
|
* (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)
|
* @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;
|
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();
|
FTPClient ftpClient = getFTPClient();
|
||||||
|
|
||||||
|
@ -806,7 +807,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#delete(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
|
* @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;
|
boolean hasSucceeded = false;
|
||||||
|
|
||||||
FTPClient ftpClient = getFTPClient();
|
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);
|
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 {
|
try {
|
||||||
hasSucceeded = FTPReply.isPositiveCompletion(ftpClient.cwd(remoteParent));
|
hasSucceeded = FTPReply.isPositiveCompletion(ftpClient.cwd(remoteParent));
|
||||||
|
@ -858,7 +859,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#rename(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String)
|
* @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;
|
boolean success = false;
|
||||||
|
|
||||||
|
@ -896,7 +897,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
/* (non-Javadoc)
|
/* (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)
|
* @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;
|
boolean success = false;
|
||||||
|
|
||||||
|
@ -924,7 +925,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#createFolder(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
|
* @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();
|
FTPClient ftpClient = getFTPClient();
|
||||||
|
@ -946,18 +947,18 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
throw new RemoteFileIOException(e);
|
throw new RemoteFileIOException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return getFile(monitor, remoteParent, folderName);
|
return getFile(remoteParent, folderName, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#createFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
|
* @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 {
|
try {
|
||||||
File tempFile = File.createTempFile("ftp", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
|
File tempFile = File.createTempFile("ftp", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
tempFile.deleteOnExit();
|
tempFile.deleteOnExit();
|
||||||
boolean success = upload(monitor, tempFile, remoteParent, fileName, _isBinaryFileType, null, null);
|
boolean success = upload(tempFile, remoteParent, fileName, _isBinaryFileType, null, null, monitor);
|
||||||
|
|
||||||
if(!success)
|
if(!success)
|
||||||
{
|
{
|
||||||
|
@ -968,21 +969,21 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
throw new RemoteFileIOException(e);
|
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));
|
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;
|
boolean hasSucceeded = false;
|
||||||
|
|
||||||
for(int i=0; i<srcNames.length; i++)
|
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)
|
if(!hasSucceeded)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -1119,8 +1120,8 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#setLastModified(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, long)
|
* @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,
|
public boolean setLastModified(String parent, String name,
|
||||||
String name, long timestamp) throws SystemMessageException
|
long timestamp, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
// not applicable for FTP
|
// not applicable for FTP
|
||||||
return false;
|
return false;
|
||||||
|
@ -1130,13 +1131,13 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.services.files.IFileService#setReadOnly(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
|
* @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,
|
public boolean setReadOnly(String parent, String name,
|
||||||
String name, boolean readOnly) throws SystemMessageException {
|
boolean readOnly, IProgressMonitor monitor) throws SystemMessageException {
|
||||||
|
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
int permissions = 0;
|
int permissions = 0;
|
||||||
|
|
||||||
FTPHostFile file = (FTPHostFile)getFile(monitor,parent, name);
|
FTPHostFile file = (FTPHostFile)getFile(parent,name, monitor);
|
||||||
|
|
||||||
int userPermissions = file.getUserPermissions();
|
int userPermissions = file.getUserPermissions();
|
||||||
int groupPermissions = file.getGroupPermissions();
|
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.
|
* Gets the input stream to access the contents of a remote file.
|
||||||
* @since 2.0
|
* @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){
|
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.
|
* Gets the output stream to write to a remote file.
|
||||||
* @since 2.0
|
* @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){
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Javier Montalvo Orús (Symbian) - patch for bug 163103 - NPE in filters
|
* 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) - fix 168586 - isCaseSensitive() on Windows
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.local.files;
|
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;
|
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);
|
File file = new File(remoteParent, remoteFile);
|
||||||
FileInputStream inputStream = null;
|
FileInputStream inputStream = null;
|
||||||
|
@ -485,7 +486,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return true;
|
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;
|
boolean isCancelled = false;
|
||||||
FileInputStream inputStream = null;
|
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))
|
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 parentFile = new File(remoteParent);
|
||||||
File fileToCreate = new File(parentFile, fileName);
|
File fileToCreate = new File(parentFile, fileName);
|
||||||
|
@ -860,7 +861,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return avp.getVirtualPart();
|
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);
|
File folderToCreate = new File(remoteParent, folderName);
|
||||||
if (!folderToCreate.exists())
|
if (!folderToCreate.exists())
|
||||||
|
@ -891,7 +892,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return new LocalVirtualHostFile(child);
|
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))
|
if (fileName.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
|
||||||
{
|
{
|
||||||
|
@ -964,7 +965,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return file.delete();
|
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);
|
File fileToRename = new File(remoteParent, oldName);
|
||||||
if (ArchiveHandlerManager.isVirtual(fileToRename.getAbsolutePath()))
|
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
|
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);
|
File newFile = new File(remoteParent, newName);
|
||||||
oldFile.renameTo(newFile.getAbsolutePath());
|
oldFile.renameTo(newFile.getAbsolutePath());
|
||||||
return retVal;
|
return retVal;
|
||||||
|
@ -1011,7 +1012,7 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return false;
|
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 sourceFolderOrFile = new File(srcParent, srcName);
|
||||||
File targetFolder = new File(tgtParent, tgtName);
|
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;
|
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 srcFile = new File(srcParent, srcName);
|
||||||
File tgtFile = new File(tgtParent, tgtName);
|
File tgtFile = new File(tgtParent, tgtName);
|
||||||
|
@ -1303,24 +1304,24 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return !isWindows();
|
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;
|
boolean ok = true;
|
||||||
for (int i = 0; i < srcParents.length; i++)
|
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;
|
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);
|
File file = new File(parent, name);
|
||||||
return file.setLastModified(timestamp);
|
return file.setLastModified(timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setReadOnly(IProgressMonitor monitor, String parent,
|
public boolean setReadOnly(String parent, String name,
|
||||||
String name, boolean readOnly) throws SystemMessageException
|
boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
File file = new File(parent, name);
|
File file = new File(parent, name);
|
||||||
if (readOnly)
|
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.
|
* Gets the input stream to access the contents of a remote file.
|
||||||
* @since 2.0
|
* @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);
|
File file = new File(remoteParent, remoteFile);
|
||||||
InputStream stream = null;
|
InputStream stream = null;
|
||||||
|
@ -1391,9 +1392,9 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
/**
|
/**
|
||||||
* Gets the output stream to write to a remote file.
|
* Gets the output stream to write to a remote file.
|
||||||
* @since 2.0
|
* @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);
|
File file = new File(remoteParent, remoteFile);
|
||||||
OutputStream stream = null;
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.local.processes;
|
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;
|
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;
|
IHostProcess[] processes = null;
|
||||||
|
|
||||||
|
@ -69,12 +69,12 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
||||||
return processes;
|
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;
|
IHostProcess process = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
process = getProcess(monitor, PID);
|
process = getProcess(PID, monitor);
|
||||||
|
|
||||||
// if there is no process, simply return true
|
// if there is no process, simply return true
|
||||||
if (process == null) {
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.local.shells;
|
package org.eclipse.rse.internal.services.local.shells;
|
||||||
|
@ -48,26 +48,26 @@ public class LocalShellService implements IShellService, ILocalService
|
||||||
return LocalServiceResources.Local_Shell_Service_Description;
|
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$
|
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);
|
LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,SHELL_INVOCATION, encoding, environment);
|
||||||
hostShell.run(monitor);
|
hostShell.run(monitor);
|
||||||
return hostShell;
|
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$
|
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);
|
LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,command, encoding, environment);
|
||||||
hostShell.run(monitor);
|
hostShell.run(monitor);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* Martin Oberhuber (Wind River) - initial API and implementation
|
* Martin Oberhuber (Wind River) - initial API and implementation
|
||||||
* Dave Dykstal (IBM) - fixing bug 162510: correctly process filter strings
|
* Dave Dykstal (IBM) - fixing bug 162510: correctly process filter strings
|
||||||
* Kushal Munir (IBM) - for API bug
|
* 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;
|
package org.eclipse.rse.internal.services.ssh.files;
|
||||||
|
@ -241,7 +242,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return new RemoteFileIOException(e);
|
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,
|
//TODO getFile() must return a dummy even for non-existent files,
|
||||||
//or the move() operation will fail. This needs to be described in
|
//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$
|
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?
|
//TODO what to do with isBinary?
|
||||||
ChannelSftp channel = null;
|
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
|
//TODO hack for now
|
||||||
try
|
try
|
||||||
|
@ -500,7 +501,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
bos.write(buffer, 0, readCount);
|
bos.write(buffer, 0, readCount);
|
||||||
}
|
}
|
||||||
bos.close();
|
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) {
|
catch (Exception e) {
|
||||||
throw makeSystemMessageException(e);
|
throw makeSystemMessageException(e);
|
||||||
|
@ -509,7 +510,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return true;
|
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;
|
ChannelSftp channel = null;
|
||||||
try {
|
try {
|
||||||
|
@ -568,7 +569,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
String name = fUserHome.substring(lastSlash + 1);
|
String name = fUserHome.substring(lastSlash + 1);
|
||||||
String parent = fUserHome.substring(0, lastSlash);
|
String parent = fUserHome.substring(0, lastSlash);
|
||||||
try {
|
try {
|
||||||
return getFile(null, parent, name);
|
return getFile(parent, name, null);
|
||||||
} catch(SystemMessageException e) {
|
} catch(SystemMessageException e) {
|
||||||
//Could not determine user home
|
//Could not determine user home
|
||||||
//return new SftpHostFile(".",".",true,false,false,0,0); //$NON-NLS-1$ //$NON-NLS-2$
|
//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 };
|
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;
|
IHostFile result = null;
|
||||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||||
|
@ -605,7 +606,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return result;
|
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;
|
IHostFile result = null;
|
||||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||||
|
@ -625,7 +626,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return result;
|
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;
|
boolean ok=false;
|
||||||
Activator.trace("SftpFileService.delete.waitForLock"); //$NON-NLS-1$
|
Activator.trace("SftpFileService.delete.waitForLock"); //$NON-NLS-1$
|
||||||
|
@ -677,7 +678,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return ok;
|
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;
|
boolean ok=false;
|
||||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
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 {
|
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException {
|
||||||
// TODO dont know how to update
|
// 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) {
|
private boolean progressWorked(IProgressMonitor monitor, int work) {
|
||||||
|
@ -766,7 +767,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return result;
|
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.
|
// move is not supported by sftp directly. Use the ssh shell instead.
|
||||||
// TODO check if newer versions of sftp support move directly
|
// TODO check if newer versions of sftp support move directly
|
||||||
|
@ -779,7 +780,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return (rv==0);
|
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.
|
// copy is not supported by sftp directly. Use the ssh shell instead.
|
||||||
// TODO check if newer versions of sftp support copy directly
|
// 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)
|
// 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);
|
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$
|
Activator.trace("SftpFileService.copyBatch "+srcNames); //$NON-NLS-1$
|
||||||
boolean ok = true;
|
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
|
//TODO check what should happen if one file throws an Exception
|
||||||
//should the batch job continue?
|
//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;
|
return ok;
|
||||||
}
|
}
|
||||||
|
@ -824,8 +825,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setLastModified(IProgressMonitor monitor, String parent,
|
public boolean setLastModified(String parent, String name,
|
||||||
String name, long timestamp) throws SystemMessageException
|
long timestamp, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
boolean ok=false;
|
boolean ok=false;
|
||||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||||
|
@ -844,8 +845,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setReadOnly(IProgressMonitor monitor, String parent,
|
public boolean setReadOnly(String parent, String name,
|
||||||
String name, boolean readOnly) throws SystemMessageException {
|
boolean readOnly, IProgressMonitor monitor) throws SystemMessageException {
|
||||||
boolean ok=false;
|
boolean ok=false;
|
||||||
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
|
||||||
try {
|
try {
|
||||||
|
@ -880,9 +881,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
/**
|
/**
|
||||||
* Gets the input stream to access the contents of a remote file.
|
* Gets the input stream to access the contents of a remote file.
|
||||||
* @since 2.0
|
* @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;
|
InputStream stream = null;
|
||||||
|
|
||||||
|
@ -905,9 +906,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
/**
|
/**
|
||||||
* Gets the output stream to write to a remote file.
|
* Gets the output stream to write to a remote file.
|
||||||
* @since 2.0
|
* @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) {
|
if (monitor == null) {
|
||||||
monitor = new NullProgressMonitor();
|
monitor = new NullProgressMonitor();
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted from LocalShellService.
|
* 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;
|
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
|
//TODO abstract base class should handle default encodings
|
||||||
public IHostShell launchShell(IProgressMonitor monitor,
|
public IHostShell launchShell(String initialWorkingDirectory,
|
||||||
String initialWorkingDirectory, String[] environment) {
|
String[] environment, IProgressMonitor monitor) {
|
||||||
String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
|
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,
|
public IHostShell launchShell(String initialWorkingDirectory,
|
||||||
String initialWorkingDirectory, String encoding,
|
String encoding, String[] environment,
|
||||||
String[] environment) {
|
IProgressMonitor monitor) {
|
||||||
SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, SshHostShell.SHELL_INVOCATION, encoding, environment);
|
SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, SshHostShell.SHELL_INVOCATION, encoding, environment);
|
||||||
return hostShell;
|
return hostShell;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO abstract base class should handle default encodings
|
//TODO abstract base class should handle default encodings
|
||||||
public IHostShell runCommand(IProgressMonitor monitor,
|
public IHostShell runCommand(String initialWorkingDirectory,
|
||||||
String initialWorkingDirectory, String command, String[] environment) {
|
String command, String[] environment, IProgressMonitor monitor) {
|
||||||
String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
|
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,
|
public IHostShell runCommand(String initialWorkingDirectory,
|
||||||
String initialWorkingDirectory, String command, String encoding,
|
String command, String encoding, String[] environment,
|
||||||
String[] environment) {
|
IProgressMonitor monitor) {
|
||||||
SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, command, encoding, environment);
|
SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, command, encoding, environment);
|
||||||
return hostShell;
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.files;
|
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_FILES = 1;
|
||||||
public static final int FILE_TYPE_FOLDERS = 2;
|
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);
|
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);
|
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);
|
return internalFetch(monitor, parentPath, fileFilter, FILE_TYPE_FILES_AND_FOLDERS);
|
||||||
}
|
}
|
||||||
|
@ -87,12 +87,12 @@ public abstract class AbstractFileService implements IFileService
|
||||||
return null;
|
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;
|
boolean ok = true;
|
||||||
for (int i = 0; i < remoteParents.length; i++)
|
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;
|
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.
|
* 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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default implementation returns <code>null</code>. Clients can override to return an output stream to the file.
|
* 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;
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.files;
|
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
|
* 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.
|
* 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 stream input stream to transfer
|
||||||
* @param remoteParent - a string designating the parent folder of the target for this file.
|
* @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 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 isBinary - indicates whether the file is text or binary
|
||||||
* @param hostEncoding - the tgt 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
|
* @return true if the file was uploaded
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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
|
* 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.
|
* 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 localFile - a real file in the local file system.
|
||||||
* @param remoteParent - a string designating the parent folder of the target for this file.
|
* @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 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 isBinary - indicates whether the file is text or binary
|
||||||
* @param srcEncoding - the src encoding of the file (if text)
|
* @param srcEncoding - the src encoding of the file (if text)
|
||||||
* @param hostEncoding - the tgt 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
|
* @return true if the file was uploaded
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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.
|
* 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 remoteParent - a String designating the remote parent.
|
||||||
* @param remoteFile - a String designating the remote file residing in the 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
|
* @param localFile - The file that is to be written. If the file exists it is
|
||||||
* overwritten.
|
* overwritten.
|
||||||
* @param isBinary - indicates whether the file is text on binary
|
* @param isBinary - indicates whether the file is text on binary
|
||||||
* @param hostEncoding - the encoding on the host (if text)
|
* @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.
|
* @return true if the file was copied from the remote system.
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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 remoteParent
|
||||||
* @param name
|
* @param name
|
||||||
|
* @param monitor the monitor for this potentially long running operation
|
||||||
* @return the host file given the parent path and file name
|
* @return the host file given the parent path and file name
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public 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
|
* @param remoteParent - the name of the parent directory on the remote file
|
||||||
* system from which to retrieve the child list.
|
* system from which to retrieve the child list.
|
||||||
* @param fileFilter - a string that can be used to filter the children. Only
|
* @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
|
* those files matching the filter make it into the list. The interface
|
||||||
* does not dictate where the filtering occurs.
|
* does not dictate where the filtering occurs.
|
||||||
|
* @param monitor the monitor for this potentially long running operation
|
||||||
* @return the list of host files.
|
* @return the list of host files.
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public 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
|
* @param remoteParent - the name of the parent directory on the remote file
|
||||||
* system from which to retrieve the child list.
|
* system from which to retrieve the child list.
|
||||||
* @param fileFilter - a string that can be used to filter the children. Only
|
* @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
|
* those files matching the filter make it into the list. The interface
|
||||||
* does not dictate where the filtering occurs.
|
* does not dictate where the filtering occurs.
|
||||||
|
* @param monitor the monitor for this potentially long running operation
|
||||||
* @return the list of host files.
|
* @return the list of host files.
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public 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
|
* @param remoteParent - the name of the parent directory on the remote file
|
||||||
* system from which to retrieve the child list.
|
* system from which to retrieve the child list.
|
||||||
* @param fileFilter - a string that can be used to filter the children. Only
|
* @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
|
* those files matching the filter make it into the list. The interface
|
||||||
* does not dictate where the filtering occurs.
|
* does not dictate where the filtering occurs.
|
||||||
|
* @param monitor the monitor for this potentially long running operation
|
||||||
* @return the list of host files.
|
* @return the list of host files.
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public 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
|
* @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
|
* Create a file on the host
|
||||||
* @param monitor the monitor for this potentially long running operation
|
|
||||||
* @param remoteParent the parent directory
|
* @param remoteParent the parent directory
|
||||||
* @param fileName the name of the new file
|
* @param fileName the name of the new file
|
||||||
|
* @param monitor the monitor for this potentially long running operation
|
||||||
* @return the newly created file
|
* @return the newly created file
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public 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
|
* Create a folder on the host
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param remoteParent the parent directory
|
* @param remoteParent the parent directory
|
||||||
* @param folderName the name of the new folder
|
* @param folderName the name of the new folder
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return the newly created folder
|
* @return the newly created folder
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public 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
|
* Deletes a file or folder on the host
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param remoteParent the folder containing the file to delete
|
* @param remoteParent the folder containing the file to delete
|
||||||
* @param fileName the name of the file or folder to delete
|
* @param fileName the name of the file or folder to delete
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return true if successful
|
* @return true if successful
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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
|
* 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
|
* 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.
|
* for deleted resources.
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param remoteParents the array of folders containing the files to delete
|
* @param remoteParents the array of folders containing the files to delete
|
||||||
* @param fileNames the names of the files or folders 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
|
* @return true iff all deletes are successful
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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
|
* Renames a file or folder on the host
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param remoteParent the folder containing the file to rename
|
* @param remoteParent the folder containing the file to rename
|
||||||
* @param oldName the old name of the file or folder to rename
|
* @param oldName the old name of the file or folder to rename
|
||||||
* @param newName the new name for the file
|
* @param newName the new name for the file
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return true if successful
|
* @return true if successful
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException;
|
public boolean rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renames a file or folder on the host
|
* Renames a file or folder on the host
|
||||||
|
@ -225,41 +225,41 @@ public interface IFileService extends IService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move the file or folder specified
|
* Move the file or folder specified
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param srcParent the folder containing the file or folder to move
|
* @param srcParent the folder containing the file or folder to move
|
||||||
* @param srcName the new of 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 tgtParent the destination folder for the move
|
||||||
* @param tgtName the name of the moved file or folder
|
* @param tgtName the name of the moved file or folder
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return true if the file was moved
|
* @return true if the file was moved
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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
|
* 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 srcParent the folder containing the file or folder to copy
|
||||||
* @param srcName the new of 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 tgtParent the destination folder for the copy
|
||||||
* @param tgtName the name of the copied file or folder
|
* @param tgtName the name of the copied file or folder
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return true if the file was copied successfully
|
* @return true if the file was copied successfully
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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
|
* 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 srcParents the folders containing each file or folder to copy
|
||||||
* @param srcNames the names of the files or folders to copy
|
* @param srcNames the names of the files or folders to copy
|
||||||
* @param tgtParent the destination folder for the copy
|
* @param tgtParent the destination folder for the copy
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return true if all files were copied
|
* @return true if all files were copied
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* Typically this would be one of those in the RemoteFileException family.
|
* Typically this would be one of those in the RemoteFileException family.
|
||||||
*/
|
*/
|
||||||
public boolean 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
|
* 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
|
* 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 parent the parent path of the file to set
|
||||||
* @param name the name of the file to set
|
* @param name the name of the file to set
|
||||||
* @param timestamp the new timestamp
|
* @param timestamp the new timestamp
|
||||||
|
* @param monitor the progress monitor
|
||||||
* @return true if the file timestamp was changed successfully
|
* @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
|
* 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 parent the parent path of the file to set
|
||||||
* @param name the name 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 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
|
* @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.
|
* 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.
|
* 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 remoteParent the absolute path of the parent.
|
||||||
* @param remoteFile the name of the remote file.
|
* @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 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.
|
* @return the input stream to access the contents of the remote file.
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* @since 2.0
|
* @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.
|
* 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 remoteParent the absolute path of the parent.
|
||||||
* @param remoteFile the name of the remote file.
|
* @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 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.
|
* @return the input stream to access the contents of the remote file.
|
||||||
* @throws SystemMessageException if an error occurs.
|
* @throws SystemMessageException if an error occurs.
|
||||||
* @since 2.0
|
* @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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.processes;
|
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 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();
|
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
||||||
rpfs.setName(exeNameFilter);
|
rpfs.setName(exeNameFilter);
|
||||||
rpfs.setUsername(userNameFilter);
|
rpfs.setUsername(userNameFilter);
|
||||||
rpfs.setSpecificState(stateFilter);
|
rpfs.setSpecificState(stateFilter);
|
||||||
return listAllProcesses(monitor, rpfs);
|
return listAllProcesses(rpfs, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException
|
public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
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
|
public IHostProcess[] listRootProcesses(IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
IHostProcess[] roots = new IHostProcess[1];
|
IHostProcess[] roots = new IHostProcess[1];
|
||||||
roots[0] = getProcess(monitor, 1);
|
roots[0] = getProcess(1, monitor);
|
||||||
return roots;
|
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$
|
String pPidString = "" + parentPID; //$NON-NLS-1$
|
||||||
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
||||||
rpfs.setPpid(pPidString);
|
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$
|
String pPidString = "" + parentPID; //$NON-NLS-1$
|
||||||
filter.setPpid(pPidString);
|
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();
|
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
||||||
rpfs.setPid(pidString);
|
rpfs.setPid(pidString);
|
||||||
|
|
||||||
IHostProcess[] results = listAllProcesses(monitor, rpfs);
|
IHostProcess[] results = listAllProcesses(rpfs, monitor);
|
||||||
if ((results == null) || (results.length == 0)) return null;
|
if ((results == null) || (results.length == 0)) return null;
|
||||||
else return results[0];
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.processes;
|
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.
|
* 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 filter An object to filter results by
|
||||||
|
* @param monitor A progress monitor to which progress will be reported
|
||||||
* @return Filtered list of processes
|
* @return Filtered list of processes
|
||||||
* @throws SystemMessageException
|
* @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.
|
* 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 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 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 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
|
* @return Filtered list of processes
|
||||||
* @throws SystemMessageException
|
* @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
|
* 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
|
* 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 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
|
* @return List of child processes
|
||||||
* @throws SystemMessageException
|
* @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
|
* 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 parentPID The ID of the parent process whose children are to be listed
|
||||||
* @param filter A filter to narrow results by
|
* @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
|
* @return Filtered list of child processes
|
||||||
* @throws SystemMessageException
|
* @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.
|
* 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 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
|
* @return The parent process
|
||||||
* @throws SystemMessageException
|
* @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.
|
* 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
|
||||||
* @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
|
* @return IHostProcess object for the given pid
|
||||||
* @throws SystemMessageException
|
* @throws SystemMessageException
|
||||||
*/
|
*/
|
||||||
public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
|
public IHostProcess getProcess(long pid, IProgressMonitor monitor) throws SystemMessageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kills a process.
|
* 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 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>.
|
* @return <code>false</code> if the given process doesn't exist, else <code>true</code>.
|
||||||
* Throws an exception if anything fails.
|
* Throws an exception if anything fails.
|
||||||
* @throws SystemMessageException
|
* @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
|
* 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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.search;
|
package org.eclipse.rse.services.search;
|
||||||
|
@ -33,14 +33,14 @@ public abstract class AbstractSearchService implements ISearchService
|
||||||
_searches = new HashMap();
|
_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);
|
ISearchHandler handler = internalSearch(monitor, searchConfig, fileService);
|
||||||
_searches.put(searchConfig, handler);
|
_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);
|
ISearchHandler handler = (ISearchHandler)_searches.get(searchConfig);
|
||||||
handler.cancel(monitor);
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.search;
|
package org.eclipse.rse.services.search;
|
||||||
|
@ -21,7 +21,7 @@ import org.eclipse.rse.services.files.IFileService;
|
||||||
|
|
||||||
public interface ISearchService
|
public interface ISearchService
|
||||||
{
|
{
|
||||||
public void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService);
|
public void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor);
|
||||||
public void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig);
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.services.shells;
|
package org.eclipse.rse.services.shells;
|
||||||
|
@ -28,43 +28,43 @@ public interface IShellService extends IService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Launch a new shell in the specified directory
|
* Launch a new shell in the specified directory
|
||||||
* @param monitor
|
|
||||||
* @param initialWorkingDirectory
|
* @param initialWorkingDirectory
|
||||||
* @param environment Array of environment variable Strings of the form "var=text"
|
* @param environment Array of environment variable Strings of the form "var=text"
|
||||||
|
* @param monitor
|
||||||
* @return the shell object
|
* @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
|
* Launch a new shell in the specified directory
|
||||||
* @param monitor
|
|
||||||
* @param initialWorkingDirectory
|
* @param initialWorkingDirectory
|
||||||
* @param encoding
|
* @param encoding
|
||||||
* @param environment Array of environment variable Strings of the form "var=text"
|
* @param environment Array of environment variable Strings of the form "var=text"
|
||||||
|
* @param monitor
|
||||||
* @return the shell object
|
* @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
|
* Run a command in it's own shell
|
||||||
* @param monitor
|
|
||||||
* @param initialWorkingDirectory
|
* @param initialWorkingDirectory
|
||||||
* @param command
|
* @param command
|
||||||
* @param environment Array of environment variable Strings of the form "var=text"
|
* @param environment Array of environment variable Strings of the form "var=text"
|
||||||
|
* @param monitor
|
||||||
* @return the shell object for getting output and error streams
|
* @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
|
* Run a command in it's own shell
|
||||||
* @param monitor
|
|
||||||
* @param initialWorkingDirectory
|
* @param initialWorkingDirectory
|
||||||
* @param command
|
* @param command
|
||||||
* @param encoding
|
* @param encoding
|
||||||
* @param environment Array of environment variable Strings of the form "var=text"
|
* @param environment Array of environment variable Strings of the form "var=text"
|
||||||
|
* @param monitor
|
||||||
* @return the shell object for getting output and error streams
|
* @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.
|
* Return an array of environment variables that describe the environment on the host.
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.shells.ui;
|
package org.eclipse.rse.internal.shells.ui;
|
||||||
|
@ -152,7 +153,7 @@ public class SystemRemoteCommandEntryForm extends Composite
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
currSubSystem.runCommand(new NullProgressMonitor(), cmd, null);
|
currSubSystem.runCommand(cmd, null, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch ( Exception e )
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
|
* 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;
|
package org.eclipse.rse.internal.shells.ui.actions;
|
||||||
|
@ -448,7 +449,7 @@ public class SystemCommandAction extends SystemBaseAction
|
||||||
|
|
||||||
if (launchNewShell)
|
if (launchNewShell)
|
||||||
{
|
{
|
||||||
Object[] results = cmdSubSystem.runCommand(monitor, cmd, _selected);
|
Object[] results = cmdSubSystem.runCommand(cmd, _selected, monitor);
|
||||||
Object cmdObject = results[0];
|
Object cmdObject = results[0];
|
||||||
if (cmdObject instanceof IRemoteCommandShell)
|
if (cmdObject instanceof IRemoteCommandShell)
|
||||||
{
|
{
|
||||||
|
@ -470,8 +471,8 @@ public class SystemCommandAction extends SystemBaseAction
|
||||||
{
|
{
|
||||||
cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
|
cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
cmdSubSystem.sendCommandToShell(monitor, cdCmd, defaultShell);
|
cmdSubSystem.sendCommandToShell(cdCmd, defaultShell, monitor);
|
||||||
cmdSubSystem.sendCommandToShell(monitor, cmd, defaultShell);
|
cmdSubSystem.sendCommandToShell(cmd, defaultShell, monitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -479,7 +480,7 @@ public class SystemCommandAction extends SystemBaseAction
|
||||||
IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
|
IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
|
||||||
if (cmdSubSystem != null)
|
if (cmdSubSystem != null)
|
||||||
{
|
{
|
||||||
Object[] results = cmdSubSystem.runCommand(monitor, cmd, _selected);
|
Object[] results = cmdSubSystem.runCommand(cmd, _selected, monitor);
|
||||||
Object cmdObject = results[0];
|
Object cmdObject = results[0];
|
||||||
if (cmdObject instanceof IRemoteCommandShell)
|
if (cmdObject instanceof IRemoteCommandShell)
|
||||||
{
|
{
|
||||||
|
@ -529,7 +530,7 @@ public class SystemCommandAction extends SystemBaseAction
|
||||||
{
|
{
|
||||||
SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
|
SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
|
||||||
SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
|
SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
|
||||||
IRemoteCommandShell cmd = cmdSubSystem.runShell(new NullProgressMonitor(), _selected);
|
IRemoteCommandShell cmd = cmdSubSystem.runShell(_selected, new NullProgressMonitor());
|
||||||
cmdsPart.updateOutput(cmd);
|
cmdsPart.updateOutput(cmd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -539,7 +540,7 @@ public class SystemCommandAction extends SystemBaseAction
|
||||||
{
|
{
|
||||||
SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
|
SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
|
||||||
SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
|
SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
|
||||||
IRemoteCommandShell cmd = cmdSubSystem.runShell(new NullProgressMonitor(), _selected);
|
IRemoteCommandShell cmd = cmdSubSystem.runShell(_selected, new NullProgressMonitor());
|
||||||
cmdsPart.updateOutput(cmd);
|
cmdsPart.updateOutput(cmd);
|
||||||
}
|
}
|
||||||
//showInView(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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.shells.ui.actions;
|
package org.eclipse.rse.internal.shells.ui.actions;
|
||||||
|
@ -82,7 +82,7 @@ public class SystemTerminateShellAction extends SystemBaseShellAction
|
||||||
IRemoteCmdSubSystem cmdSubSystem = command.getCommandSubSystem();
|
IRemoteCmdSubSystem cmdSubSystem = command.getCommandSubSystem();
|
||||||
if (cmdSubSystem != null)
|
if (cmdSubSystem != null)
|
||||||
{
|
{
|
||||||
cmdSubSystem.cancelShell(new NullProgressMonitor(), command);
|
cmdSubSystem.cancelShell(command, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||||
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemThemeConstants
|
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemThemeConstants
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.shells.ui.view;
|
package org.eclipse.rse.internal.shells.ui.view;
|
||||||
|
@ -450,7 +451,7 @@ FocusListener
|
||||||
IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
|
IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
commandSubSystem.sendCommandToShell(new NullProgressMonitor(), inputStr, remoteCommand);
|
commandSubSystem.sendCommandToShell(inputStr, remoteCommand, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -471,7 +472,7 @@ FocusListener
|
||||||
IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
|
IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
commandSubSystem.sendCommandToShell(new NullProgressMonitor(), "#break", remoteCommand); //$NON-NLS-1$
|
commandSubSystem.sendCommandToShell("#break", remoteCommand, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* 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) - [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;
|
package org.eclipse.rse.internal.shells.ui.view;
|
||||||
|
@ -149,7 +150,7 @@ public class SystemCommandsViewPart
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IRemoteCommandShell cmd = _cmdSubSystem.runShell(new NullProgressMonitor(), null);
|
IRemoteCommandShell cmd = _cmdSubSystem.runShell(null, new NullProgressMonitor());
|
||||||
if (cmd != null)
|
if (cmd != null)
|
||||||
{
|
{
|
||||||
showInView(cmd);
|
showInView(cmd);
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
|
* 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) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by 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;
|
package org.eclipse.rse.shells.ui;
|
||||||
|
@ -155,9 +156,9 @@ public class RemoteCommandHelpers
|
||||||
cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
|
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) - [180562] dont implement ISystemOutputRemoteTypes
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.shells.ui.view;
|
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
|
* 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)
|
if (element instanceof IRemoteCommandShell)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
* Martin Oberhuber (Wind River) - Fix 162962 - recursive removeCachedRemoteFile()
|
* Martin Oberhuber (Wind River) - Fix 162962 - recursive removeCachedRemoteFile()
|
||||||
* Martin Oberhuber (Wind River) - [168596] FileServiceSubSystem.isCaseSensitive()
|
* Martin Oberhuber (Wind River) - [168596] FileServiceSubSystem.isCaseSensitive()
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
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
|
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
|
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
|
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
|
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
|
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);
|
File localFile = new File(localpath);
|
||||||
try
|
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)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -508,7 +509,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
}
|
}
|
||||||
try
|
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)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -543,7 +544,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
|
|
||||||
try
|
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)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -557,7 +558,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
IFileService service = getFileService();
|
IFileService service = getFileService();
|
||||||
try
|
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)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -581,7 +582,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return service.copyBatch(monitor, sourceParents, sourceNames, targetFolder.getAbsolutePath());
|
return service.copyBatch(sourceParents, sourceNames, targetFolder.getAbsolutePath(), monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -613,7 +614,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newFile = service.createFile(monitor, parent, name);
|
newFile = service.createFile(parent, name, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -634,7 +635,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
IHostFile newFolder = null;
|
IHostFile newFolder = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newFolder = service.createFolder(monitor, parent, name);
|
newFolder = service.createFolder(parent, name, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -658,7 +659,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
String name = folderOrFile.getName();
|
String name = folderOrFile.getName();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = service.delete(monitor, parent, name);
|
result = service.delete(parent, name, monitor);
|
||||||
folderOrFile.markStale(true);
|
folderOrFile.markStale(true);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
|
@ -686,7 +687,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
IFileService service = getFileService();
|
IFileService service = getFileService();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = service.deleteBatch(monitor, parents, names);
|
result = service.deleteBatch(parents, names, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -707,7 +708,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
String newPath = srcParent + folderOrFile.getSeparator() + newName;
|
String newPath = srcParent + folderOrFile.getSeparator() + newName;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = service.rename(monitor, srcParent, oldName, newName);
|
result = service.rename(srcParent, oldName, newName, monitor);
|
||||||
folderOrFile.getHostFile().renameTo(newPath);
|
folderOrFile.getHostFile().renameTo(newPath);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
|
@ -729,7 +730,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
removeCachedRemoteFile(sourceFolderOrFile);
|
removeCachedRemoteFile(sourceFolderOrFile);
|
||||||
result = service.move(monitor, srcParent, srcName, tgtParent, newName);
|
result = service.move(srcParent, srcName, tgtParent, newName, monitor);
|
||||||
sourceFolderOrFile.markStale(true);
|
sourceFolderOrFile.markStale(true);
|
||||||
targetFolder.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 name = folderOrFile.getName();
|
||||||
String parent = folderOrFile.getParentPath();
|
String parent = folderOrFile.getParentPath();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _hostFileService.setLastModified(monitor, parent, name, newDate);
|
return _hostFileService.setLastModified(parent, name, newDate, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
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 name = folderOrFile.getName();
|
||||||
String parent = folderOrFile.getParentPath();
|
String parent = folderOrFile.getParentPath();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _hostFileService.setReadOnly(monitor, parent, name, readOnly);
|
return _hostFileService.setReadOnly(parent, name, readOnly, monitor);
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
@ -804,7 +805,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
ISearchService searchService = getSearchService();
|
ISearchService searchService = getSearchService();
|
||||||
if (searchService != null)
|
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)
|
* @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 {
|
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)
|
* @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 {
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
|
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
|
||||||
|
@ -43,7 +43,7 @@ public class SearchJob extends Job
|
||||||
|
|
||||||
protected IStatus run(IProgressMonitor monitor)
|
protected IStatus run(IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
_searchService.search(monitor, _searchConfig, _fileService);
|
_searchService.search(_searchConfig, _fileService, monitor);
|
||||||
|
|
||||||
OutputRefresh refresh = new OutputRefresh(_searchConfig);
|
OutputRefresh refresh = new OutputRefresh(_searchConfig);
|
||||||
Display.getDefault().asyncExec(refresh);
|
Display.getDefault().asyncExec(refresh);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.files.core.subsystems;
|
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.
|
* 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.
|
* 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 folderOrFile represents the object to be renamed.
|
||||||
* @param newDate new date, in milliseconds from epoch, to assign.
|
* @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.
|
* @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.
|
* Set a files readonly permissions.
|
||||||
* Folder or file must exist on disk for this to succeed.
|
* 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 folderOrFile represents the object to be renamed.
|
||||||
* @param readOnly whether to set it to be readonly or not
|
* @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.
|
* @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.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* 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;
|
package org.eclipse.rse.internal.subsystems.files.dstore;
|
||||||
|
@ -122,7 +122,7 @@ public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchRe
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _fileSubSystem.getFileService().getFile(null, _searchObject.getParentPath(), _searchObject.getName());
|
return _fileSubSystem.getFileService().getFile(_searchObject.getParentPath(), _searchObject.getName(), null);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.subsystems.files.local;
|
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.IRemoteFile;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
|
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
|
||||||
|
|
||||||
|
|
||||||
public class LocalSearchResultConfiguration extends AbstractSearchResultConfiguration
|
public class LocalSearchResultConfiguration extends AbstractSearchResultConfiguration
|
||||||
{
|
{
|
||||||
protected IHostFileToRemoteFileAdapter _fileAdapter;
|
protected IHostFileToRemoteFileAdapter _fileAdapter;
|
||||||
|
@ -98,14 +97,14 @@ public class LocalSearchResultConfiguration extends AbstractSearchResultConfigur
|
||||||
}
|
}
|
||||||
|
|
||||||
// cancel search
|
// cancel search
|
||||||
getSearchService().cancelSearch(null, this);
|
getSearchService().cancelSearch(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getSearchTarget()
|
public Object getSearchTarget()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _fileSubSystem.getFileService().getFile(null, _searchObject.getParentPath(), _searchObject.getName());
|
return _fileSubSystem.getFileService().getFile(_searchObject.getParentPath(), _searchObject.getName(), null);
|
||||||
//return _searchObject.getAbsolutePath();
|
//return _searchObject.getAbsolutePath();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
||||||
|
@ -91,7 +92,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
|
||||||
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
||||||
rpfs.setPid("" + pid); //$NON-NLS-1$
|
rpfs.setPid("" + pid); //$NON-NLS-1$
|
||||||
IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
|
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);
|
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
|
public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException
|
||||||
{
|
{
|
||||||
checkIsConnected();
|
checkIsConnected();
|
||||||
return getProcessService().kill(null, process.getPid(), signal);
|
return getProcessService().kill(process.getPid(), signal, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -118,7 +119,7 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
|
||||||
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException
|
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException
|
||||||
{
|
{
|
||||||
checkIsConnected();
|
checkIsConnected();
|
||||||
IHostProcess[] processes = getProcessService().listAllProcesses(monitor, processFilter);
|
IHostProcess[] processes = getProcessService().listAllProcesses(processFilter, monitor);
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
|
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
|
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
checkIsConnected();
|
checkIsConnected();
|
||||||
IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid(), processFilter);
|
IHostProcess[] processes = getProcessService().listChildProcesses(parent.getPid(), processFilter, monitor);
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
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
|
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
|
||||||
{
|
{
|
||||||
checkIsConnected();
|
checkIsConnected();
|
||||||
IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid());
|
IHostProcess[] processes = getProcessService().listChildProcesses(parent.getPid(), monitor);
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Yu-Fen Kuo (MontaVista) - adapted from RSE UniversalLinuxProcessHandler
|
* Yu-Fen Kuo (MontaVista) - adapted from RSE UniversalLinuxProcessHandler
|
||||||
* Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
|
* 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;
|
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
|
||||||
|
@ -90,7 +91,7 @@ public class LinuxProcessHelper {
|
||||||
|
|
||||||
IShellService shellService = Activator.getShellService(host);
|
IShellService shellService = Activator.getShellService(host);
|
||||||
IHostShell hostShell = shellService.launchShell(
|
IHostShell hostShell = shellService.launchShell(
|
||||||
new NullProgressMonitor(), "", null); //$NON-NLS-1$
|
"", null, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
hostShell.writeToShell(getUserNameCommand());
|
hostShell.writeToShell(getUserNameCommand());
|
||||||
Process p = null;
|
Process p = null;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Yu-Fen Kuo (MontaVista) - initial API and implementation
|
* Yu-Fen Kuo (MontaVista) - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
|
* 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;
|
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
|
||||||
|
@ -65,8 +66,8 @@ public class LinuxShellProcessService extends AbstractProcessService {
|
||||||
return statusTypes;
|
return statusTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean kill(final IProgressMonitor monitor, final long PID,
|
public boolean kill(final long PID, final String signal,
|
||||||
final String signal) throws SystemMessageException {
|
final IProgressMonitor monitor) throws SystemMessageException {
|
||||||
String signalString;
|
String signalString;
|
||||||
if (signal
|
if (signal
|
||||||
.equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT))
|
.equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT))
|
||||||
|
@ -75,7 +76,7 @@ public class LinuxShellProcessService extends AbstractProcessService {
|
||||||
signalString = "-" + signal; //$NON-NLS-1$
|
signalString = "-" + signal; //$NON-NLS-1$
|
||||||
IShellService shellService = Activator.getShellService(host);
|
IShellService shellService = Activator.getShellService(host);
|
||||||
IHostShell hostShell = shellService.launchShell(
|
IHostShell hostShell = shellService.launchShell(
|
||||||
new NullProgressMonitor(), "", null); //$NON-NLS-1$
|
"", null, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
hostShell.writeToShell(getKillCommand(PID, signalString));
|
hostShell.writeToShell(getKillCommand(PID, signalString));
|
||||||
Process p = null;
|
Process p = null;
|
||||||
try {
|
try {
|
||||||
|
@ -98,8 +99,8 @@ public class LinuxShellProcessService extends AbstractProcessService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IHostProcess[] listAllProcesses(final IProgressMonitor monitor,
|
public IHostProcess[] listAllProcesses(final IHostProcessFilter filter,
|
||||||
final IHostProcessFilter filter) throws SystemMessageException {
|
final IProgressMonitor monitor) throws SystemMessageException {
|
||||||
// this is to workaround RSE bug 147531
|
// this is to workaround RSE bug 147531
|
||||||
if (filter.getUsername().equals("${user.id}") && host != null) { //$NON-NLS-1$
|
if (filter.getUsername().equals("${user.id}") && host != null) { //$NON-NLS-1$
|
||||||
IShellServiceSubSystem ss = Activator.getShellServiceSubSystem(host);
|
IShellServiceSubSystem ss = Activator.getShellServiceSubSystem(host);
|
||||||
|
@ -117,7 +118,7 @@ public class LinuxShellProcessService extends AbstractProcessService {
|
||||||
}
|
}
|
||||||
IShellService shellService = Activator.getShellService(host);
|
IShellService shellService = Activator.getShellService(host);
|
||||||
IHostShell hostShell = shellService.launchShell(
|
IHostShell hostShell = shellService.launchShell(
|
||||||
new NullProgressMonitor(), "", null); //$NON-NLS-1$
|
"", null, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
hostShell.writeToShell(getProcessesCommand());
|
hostShell.writeToShell(getProcessesCommand());
|
||||||
Process p = null;
|
Process p = null;
|
||||||
try {
|
try {
|
||||||
|
@ -213,7 +214,7 @@ public class LinuxShellProcessService extends AbstractProcessService {
|
||||||
protected String[] internalGetSignalTypes() {
|
protected String[] internalGetSignalTypes() {
|
||||||
IShellService shellService = Activator.getShellService(host);
|
IShellService shellService = Activator.getShellService(host);
|
||||||
IHostShell hostShell = shellService.launchShell(
|
IHostShell hostShell = shellService.launchShell(
|
||||||
new NullProgressMonitor(), "", null); //$NON-NLS-1$
|
"", null, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
hostShell.writeToShell(getSignalTypesCommand());
|
hostShell.writeToShell(getSignalTypesCommand());
|
||||||
Process p = null;
|
Process p = null;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.shells.core.model;
|
package org.eclipse.rse.subsystems.shells.core.model;
|
||||||
|
@ -107,7 +108,7 @@ public abstract class RemoteCommandShellOperation
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
|
RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
|
||||||
_remoteCmdShell = _cmdSubSystem.runShell(new NullProgressMonitor(), _pwd);
|
_remoteCmdShell = _cmdSubSystem.runShell(_pwd, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +140,7 @@ public abstract class RemoteCommandShellOperation
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_cmdSubSystem.cancelShell(new NullProgressMonitor(), _remoteCmdShell);
|
_cmdSubSystem.cancelShell(_remoteCmdShell, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -185,7 +186,7 @@ public abstract class RemoteCommandShellOperation
|
||||||
|
|
||||||
// echo command appended after ; so that
|
// echo command appended after ; so that
|
||||||
// it isn't treated like stdin for the intial command
|
// 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)
|
catch (Exception e)
|
||||||
|
@ -206,7 +207,7 @@ public abstract class RemoteCommandShellOperation
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_cmdSubSystem.sendCommandToShell(new NullProgressMonitor(), input, _remoteCmdShell);
|
_cmdSubSystem.sendCommandToShell(input, _remoteCmdShell, new NullProgressMonitor());
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -74,19 +89,19 @@ public class SimpleCommandOperation
|
||||||
{
|
{
|
||||||
if (_runAsShell)
|
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)
|
if (exitShell)
|
||||||
{
|
{
|
||||||
_subsystem.sendCommandToShell(new NullProgressMonitor(), "exit", _cmdShell); //$NON-NLS-1$
|
_subsystem.sendCommandToShell("exit", _cmdShell, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
Object[] result =_subsystem.runCommand(new NullProgressMonitor(), command, _workingDirectory, false);
|
Object[] result =_subsystem.runCommand(command, _workingDirectory, false, new NullProgressMonitor());
|
||||||
_cmdShell= (IRemoteCommandShell)result[0];
|
_cmdShell= (IRemoteCommandShell)result[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,13 +116,13 @@ public class SimpleCommandOperation
|
||||||
public void runCommandInShell(String exports, String command, boolean exitShell) throws Exception
|
public void runCommandInShell(String exports, String command, boolean exitShell) throws Exception
|
||||||
{
|
{
|
||||||
_runAsShell = true;
|
_runAsShell = true;
|
||||||
_cmdShell = _subsystem.runShell(null, _workingDirectory);
|
_cmdShell = _subsystem.runShell(_workingDirectory, null);
|
||||||
|
|
||||||
if (exports != 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)
|
if (exitShell)
|
||||||
{
|
{
|
||||||
exitShell();
|
exitShell();
|
||||||
|
@ -131,7 +146,7 @@ public class SimpleCommandOperation
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_subsystem.sendCommandToShell(new NullProgressMonitor(), "exit", _cmdShell); //$NON-NLS-1$
|
_subsystem.sendCommandToShell("exit", _cmdShell, new NullProgressMonitor()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -143,7 +158,7 @@ public class SimpleCommandOperation
|
||||||
{
|
{
|
||||||
if (isActive())
|
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())
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,14 +11,11 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.shells.core.subsystems;
|
package org.eclipse.rse.subsystems.shells.core.subsystems;
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -27,57 +24,51 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @lastgen interface RemoteCmdSubSystem extends SubSystem {}
|
* interface RemoteCmdSubSystem extends SubSystem {}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface IRemoteCmdSubSystem extends ISubSystem{
|
public interface IRemoteCmdSubSystem extends ISubSystem{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return parent subsystem factory, cast to a RemoteCmdSubSystemConfiguration
|
* Return parent subsystem factory, cast to a RemoteCmdSubSystemConfiguration
|
||||||
*/
|
*/
|
||||||
public IRemoteCmdSubSystemConfiguration getParentRemoteCmdSubSystemConfiguration();
|
public IRemoteCmdSubSystemConfiguration getParentRemoteCmdSubSystemConfiguration();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a remote command. This is only applicable if the subsystem factory reports
|
* Execute a remote command. This is only applicable if the subsystem factory reports
|
||||||
* true for supportsCommands().
|
* true for supportsCommands().
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param command Command to be executed remotely.
|
* @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
|
* @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.
|
* 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
|
* @return Array of objects that are the result of running this command. Typically, these
|
||||||
* are messages logged by the command.
|
* 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
|
* Execute a remote command. This is only applicable if the subsystem factory reports
|
||||||
* true for supportsCommands().
|
* true for supportsCommands().
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param command Command to be executed remotely.
|
* @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
|
* @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.
|
* command as a shell command in the default shell.
|
||||||
* @param interpretOutput whether to interpret the output or not
|
* @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
|
* @return Array of objects that are the result of running this command. Typically, these
|
||||||
* are messages logged by the command.
|
* 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
|
* Launch a new command shell. This is only applicable if the subsystem factory reports
|
||||||
* true for supportsCommands().
|
* 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 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.
|
* @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.
|
* 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.
|
* 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 input the command to invoke in the shell.
|
||||||
* @param commandObject the shell or command to send the invocation to.
|
* @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.
|
* Cancel a shell or running command.
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param commandObject the shell or command to cancel
|
* @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.
|
* Remove a shell. If the shell is running cancel it first.
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
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
|
* 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);
|
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
|
* 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);
|
IRemoteCommandShell cmdShell = internalRunShell(monitor, context);
|
||||||
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
|
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.
|
* @return Array of objects that are the result of running this command.
|
||||||
* Typically, these are messages logged by the 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 input the command to invoke in the shell.
|
||||||
* @param commandObject the shell or command to send the invocation to.
|
* @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
|
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.
|
* 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 input the command to invoke in the shell.
|
||||||
* @param commandObject the shell or command to send the invocation to.
|
* @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;
|
boolean ok = true;
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
|
@ -971,11 +971,10 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel a shell or running command.
|
* Cancel a shell or running command.
|
||||||
*
|
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param commandObject the shell or command to cancel.
|
* @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;
|
boolean ok = true;
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* 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;
|
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
|
||||||
|
@ -104,7 +105,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
|
||||||
|
|
||||||
|
|
||||||
IShellService service = getShellService();
|
IShellService service = getShellService();
|
||||||
IHostShell hostShell = service.runCommand(monitor, cwd, cmd, getUserAndHostEnvVarsAsStringArray());
|
IHostShell hostShell = service.runCommand(cwd, cmd, getUserAndHostEnvVarsAsStringArray(), monitor);
|
||||||
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
|
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
|
||||||
hostShell.addOutputListener(cmdShell);
|
hostShell.addOutputListener(cmdShell);
|
||||||
|
|
||||||
|
@ -141,7 +142,7 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
|
||||||
|
|
||||||
|
|
||||||
IShellService service = getShellService();
|
IShellService service = getShellService();
|
||||||
IHostShell hostShell = service.launchShell(monitor, cwd, getUserAndHostEnvVarsAsStringArray());
|
IHostShell hostShell = service.launchShell(cwd, getUserAndHostEnvVarsAsStringArray(), monitor);
|
||||||
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
|
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
|
||||||
if (cmdShell != null)
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.actions;
|
package org.eclipse.rse.internal.ui.actions;
|
||||||
|
@ -120,7 +120,7 @@ public class SystemCopyConnectionAction extends SystemBaseCopyAction
|
||||||
//String oldName = oldConnection.getAliasName();
|
//String oldName = oldConnection.getAliasName();
|
||||||
//RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
|
//RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
|
||||||
ISystemProfile targetProfile = (ISystemProfile)targetContainer;
|
ISystemProfile targetProfile = (ISystemProfile)targetContainer;
|
||||||
IHost newConn = sr.copyHost(monitor, oldConnection, targetProfile, newName);
|
IHost newConn = sr.copyHost(oldConnection, targetProfile, newName, monitor);
|
||||||
return (newConn != null);
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.actions;
|
package org.eclipse.rse.internal.ui.actions;
|
||||||
|
@ -125,7 +125,7 @@ public class SystemMoveConnectionAction extends SystemBaseCopyAction
|
||||||
//String oldName = oldConnection.getAliasName();
|
//String oldName = oldConnection.getAliasName();
|
||||||
//RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
|
//RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
|
||||||
ISystemProfile targetProfile = (ISystemProfile)targetContainer;
|
ISystemProfile targetProfile = (ISystemProfile)targetContainer;
|
||||||
IHost newConn = sr.moveHost(monitor, oldConnection, targetProfile, newName);
|
IHost newConn = sr.moveHost(oldConnection, targetProfile, newName, monitor);
|
||||||
return (newConn != null);
|
return (newConn != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.actions;
|
package org.eclipse.rse.internal.ui.actions;
|
||||||
|
@ -152,7 +153,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction
|
||||||
steps = conns.length;
|
steps = conns.length;
|
||||||
steps += 2; // for filterpools and subsystems
|
steps += 2; // for filterpools and subsystems
|
||||||
monitor.beginTask(msg, steps);
|
monitor.beginTask(msg, steps);
|
||||||
newProfile = sr.copySystemProfile(monitor, profile,newName,makeActive);
|
newProfile = sr.copySystemProfile(profile, newName,makeActive,monitor);
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
catch(java.lang.InterruptedException exc)
|
catch(java.lang.InterruptedException exc)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by 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.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -356,7 +357,7 @@ public class SystemSelectRemoteObjectAPIProviderImpl
|
||||||
Object[] children = null;
|
Object[] children = null;
|
||||||
|
|
||||||
if (filterString == null)
|
if (filterString == null)
|
||||||
children = subsystemAdapter.getChildren(new NullProgressMonitor(), (IAdaptable)subsystem);
|
children = subsystemAdapter.getChildren((IAdaptable)subsystem, new NullProgressMonitor());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
children = resolveFilterString(subsystem, filterString);
|
children = resolveFilterString(subsystem, filterString);
|
||||||
|
@ -592,7 +593,7 @@ public class SystemSelectRemoteObjectAPIProviderImpl
|
||||||
Object[] children = null;
|
Object[] children = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
children = subsystem.resolveFilterString(new NullProgressMonitor(), filterString);
|
children = subsystem.resolveFilterString(filterString, new NullProgressMonitor());
|
||||||
} catch (InterruptedException exc)
|
} catch (InterruptedException exc)
|
||||||
{
|
{
|
||||||
if (canceledObject == null)
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -226,11 +226,11 @@ public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelP
|
||||||
{
|
{
|
||||||
if (object instanceof IContextObject)
|
if (object instanceof IContextObject)
|
||||||
{
|
{
|
||||||
results = adapter.getChildren(new NullProgressMonitor(), (IContextObject)object);
|
results = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
results = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
|
results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (adapter instanceof SystemViewRootInputAdapter && results != null)
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -156,7 +156,7 @@ public class SystemTableViewProvider implements ILabelProvider, ITableLabelProvi
|
||||||
if (adapter != null)
|
if (adapter != null)
|
||||||
{
|
{
|
||||||
adapter.setViewer(_viewer);
|
adapter.setViewer(_viewer);
|
||||||
results = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
|
results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
|
||||||
if (adapter instanceof SystemViewRootInputAdapter)
|
if (adapter instanceof SystemViewRootInputAdapter)
|
||||||
{
|
{
|
||||||
ArrayList filterredResults = new ArrayList();
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -87,7 +87,7 @@ public class SystemTestFilterStringAPIProviderImpl
|
||||||
return children;
|
return children;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
children = subsystem.resolveFilterString(new NullProgressMonitor(), filterString);
|
children = subsystem.resolveFilterString(filterString, new NullProgressMonitor());
|
||||||
if ((children == null) || (children.length==0))
|
if ((children == null) || (children.length==0))
|
||||||
{
|
{
|
||||||
if (nullObject == null)
|
if (nullObject == null)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -5524,7 +5525,7 @@ public class SystemView extends SafeTreeViewer
|
||||||
// need to apply filter
|
// need to apply filter
|
||||||
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
|
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
|
||||||
IContextObject contextObject = getContextObject((TreeItem)match);
|
IContextObject contextObject = getContextObject((TreeItem)match);
|
||||||
Object[] newChildren = adapter.getChildren(new NullProgressMonitor(), contextObject);
|
Object[] newChildren = adapter.getChildren(contextObject, new NullProgressMonitor());
|
||||||
internalAdd(match, parentElementOrTreePath, newChildren);
|
internalAdd(match, parentElementOrTreePath, newChildren);
|
||||||
}
|
}
|
||||||
else
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -65,7 +65,7 @@ public class SystemViewAPIProviderForConnections
|
||||||
public Object[] getSystemViewRoots()
|
public Object[] getSystemViewRoots()
|
||||||
{
|
{
|
||||||
//return sr.getSubSystems(connection);
|
//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
|
* Return true if {@link #getSystemViewRoots()} will return a non-empty list
|
||||||
|
@ -84,7 +84,7 @@ public class SystemViewAPIProviderForConnections
|
||||||
public Object[] getConnectionChildren(IHost selectedConnection)
|
public Object[] getConnectionChildren(IHost selectedConnection)
|
||||||
{
|
{
|
||||||
//return sr.getSubSystems(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
|
* 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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -137,7 +137,7 @@ public class SystemViewAPIProviderForFilterStrings
|
||||||
Object[] children = null;
|
Object[] children = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
children = ss.resolveFilterString(new NullProgressMonitor(), filterStringReference.getString());
|
children = ss.resolveFilterString(filterStringReference.getString(), new NullProgressMonitor());
|
||||||
if ((children == null) || (children.length==0))
|
if ((children == null) || (children.length==0))
|
||||||
{
|
{
|
||||||
children = new SystemMessageObject[1];
|
children = new SystemMessageObject[1];
|
||||||
|
|
|
@ -12,9 +12,11 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
||||||
|
@ -185,7 +187,7 @@ public class SystemViewAPIProviderForFilters
|
||||||
{
|
{
|
||||||
if (nestedFilterReferences != null)
|
if (nestedFilterReferences != null)
|
||||||
{
|
{
|
||||||
Object[] allChildren = ss.resolveFilterStrings(filterStrings);
|
Object[] allChildren = ss.resolveFilterStrings(filterStrings, new NullProgressMonitor());
|
||||||
int nbrNestedFilters = nestedFilterReferences.length;
|
int nbrNestedFilters = nestedFilterReferences.length;
|
||||||
children = new Object[nbrNestedFilters + allChildren.length];
|
children = new Object[nbrNestedFilters + allChildren.length];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -421,7 +422,7 @@ public class SystemViewConnectionAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this object
|
* Return the children of this object
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
IHost conn = (IHost)element;
|
IHost conn = (IHost)element;
|
||||||
ISystemViewInputProvider input = getInput();
|
ISystemViewInputProvider input = getInput();
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* 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) - [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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -384,7 +385,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
|
||||||
{
|
{
|
||||||
IContainer parentFolder = null;
|
IContainer parentFolder = null;
|
||||||
// corresponds to a folder
|
// 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++)
|
for (int i = 0; i < children.length; i++)
|
||||||
{
|
{
|
||||||
IAdaptable child = (IAdaptable)children[i];
|
IAdaptable child = (IAdaptable)children[i];
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -186,7 +187,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter
|
||||||
* Return the children of this filter.
|
* Return the children of this filter.
|
||||||
* This is a combination of nested filters and resolved filter objects.
|
* 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);
|
ISystemFilter filter = getFilter(element);
|
||||||
// transient filters...
|
// transient filters...
|
||||||
|
@ -228,7 +229,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter
|
||||||
}
|
}
|
||||||
// otherwise, get children and then cache
|
// otherwise, get children and then cache
|
||||||
else {
|
else {
|
||||||
children = checkForNull(ss.resolveFilterStrings(monitor, filterStrings), true);
|
children = checkForNull(ss.resolveFilterStrings(filterStrings, monitor), true);
|
||||||
|
|
||||||
if (ss.getSubSystemConfiguration().supportsFilterCaching()) {
|
if (ss.getSubSystemConfiguration().supportsFilterCaching()) {
|
||||||
simpleFilter.setContents(SystemChildrenContentsType.getInstance(), children);
|
simpleFilter.setContents(SystemChildrenContentsType.getInstance(), children);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -156,7 +157,7 @@ public class SystemViewFilterPoolAdapter extends AbstractSystemViewAdapter
|
||||||
* Return the children of this object.
|
* Return the children of this object.
|
||||||
* For filter pools, this is a list of filters.
|
* 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;
|
ISystemFilterPool fp = (ISystemFilterPool)element;
|
||||||
return fp.getSystemFilters();
|
return fp.getSystemFilters();
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Tobias Schwarz (Wind River) - [181394] Include Context in getAbsoluteName() for filter and pool references
|
* 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) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -209,7 +210,7 @@ public class SystemViewFilterPoolReferenceAdapter
|
||||||
* Return the children of this object.
|
* Return the children of this object.
|
||||||
* For filter pools, this is a list of filters.
|
* 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;
|
ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)element;
|
||||||
ISubSystem ss = getSubSystem(element);
|
ISubSystem ss = getSubSystem(element);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Tobias Schwarz (Wind River) - [181394] Include Context in getAbsoluteName() for filter and pool references
|
* 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) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
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
|
* <li>resolved objects for each filter string if user has elected NOT to show filter strings in his preferences
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
return internalGetChildren(monitor, element);
|
return internalGetChildren(monitor, element);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the children and then passes the children to the subsystem configuration adapter for filtering.
|
* 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) {
|
public Object[] getChildren(IContextObject element, IProgressMonitor monitor) {
|
||||||
Object[] children = getChildren(monitor, element.getModelObject());
|
Object[] children = getChildren(element.getModelObject(), monitor);
|
||||||
ISubSystem subsystem = element.getSubSystem();
|
ISubSystem subsystem = element.getSubSystem();
|
||||||
ISubSystemConfiguration configuration = subsystem.getSubSystemConfiguration();
|
ISubSystemConfiguration configuration = subsystem.getSubSystemConfiguration();
|
||||||
Object adapter = Platform.getAdapterManager().getAdapter(configuration, ISubSystemConfigurationAdapter.class);
|
Object adapter = Platform.getAdapterManager().getAdapter(configuration, ISubSystemConfigurationAdapter.class);
|
||||||
|
@ -400,11 +401,11 @@ public class SystemViewFilterReferenceAdapter
|
||||||
|
|
||||||
if (monitor == null)
|
if (monitor == null)
|
||||||
{
|
{
|
||||||
allChildren = ss.resolveFilterStrings(new NullProgressMonitor(), filterStrings);
|
allChildren = ss.resolveFilterStrings(filterStrings, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
allChildren = ss.resolveFilterStrings(monitor, filterStrings);
|
allChildren = ss.resolveFilterStrings(filterStrings, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allChildren == null)
|
if (allChildren == null)
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -141,7 +142,7 @@ public class SystemViewFilterStringAdapter extends AbstractSystemViewAdapter
|
||||||
* Return the children of this filter.
|
* Return the children of this filter.
|
||||||
* This returns an empty list.
|
* This returns an empty list.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -336,11 +337,11 @@ public class SystemViewLabelAndContentProvider extends LabelProvider
|
||||||
|
|
||||||
if (object instanceof IContextObject)
|
if (object instanceof IContextObject)
|
||||||
{
|
{
|
||||||
children = adapter.getChildren(new NullProgressMonitor(), (IContextObject)object);
|
children = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
children = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
|
children = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -104,7 +105,7 @@ public class SystemViewMessageAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this object. Not applicable for us.
|
* 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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -104,7 +105,7 @@ public class SystemViewPromptableAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this object. Not applicable for us.
|
* 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
|
// Note: Do _not_ call promptable.run(getShell()) here. It leads only to
|
||||||
// senseless invocations of the new connection wizard dialog on refreshs!
|
// senseless invocations of the new connection wizard dialog on refreshs!
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
|
* David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -109,7 +110,7 @@ public class SystemViewRootInputAdapter extends AbstractSystemViewAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this object
|
* Return the children of this object
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
ISystemViewInputProvider provider = (ISystemViewInputProvider)element;
|
ISystemViewInputProvider provider = (ISystemViewInputProvider)element;
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -109,7 +110,7 @@ public class SystemViewScratchpadAdapter extends AbstractSystemViewAdapter imple
|
||||||
/**
|
/**
|
||||||
* Return the children of this object
|
* Return the children of this object
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
SystemScratchpad pad = (SystemScratchpad)element;
|
SystemScratchpad pad = (SystemScratchpad)element;
|
||||||
return pad.getChildren();
|
return pad.getChildren();
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -186,7 +187,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this object
|
* 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);
|
//System.out.println("INSIDE GETCHILDREN FOR SUBSYSTEM VIEW ADAPTER: "+element);
|
||||||
ISubSystem ss = (ISubSystem)element;
|
ISubSystem ss = (ISubSystem)element;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemThemeConstants
|
* Martin Oberhuber (Wind River) - [180562] dont implement ISystemThemeConstants
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view.monitor;
|
package org.eclipse.rse.internal.ui.view.monitor;
|
||||||
|
@ -143,7 +144,7 @@ FocusListener
|
||||||
{
|
{
|
||||||
public IStatus run(IProgressMonitor monitor)
|
public IStatus run(IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
Object[] children = _adapter.getChildren(monitor, (IAdaptable)_inputObject);
|
Object[] children = _adapter.getChildren((IAdaptable)_inputObject, monitor);
|
||||||
if (children != null)
|
if (children != null)
|
||||||
{
|
{
|
||||||
SystemTableViewProvider provider = (SystemTableViewProvider)_viewer.getContentProvider();
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view.scratchpad;
|
package org.eclipse.rse.internal.ui.view.scratchpad;
|
||||||
|
@ -146,11 +146,11 @@ public class SystemScratchpadViewProvider implements ILabelProvider, ITreeConten
|
||||||
{
|
{
|
||||||
if (object instanceof IContextObject)
|
if (object instanceof IContextObject)
|
||||||
{
|
{
|
||||||
results = adapter.getChildren(new NullProgressMonitor(), (IContextObject)object);
|
results = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
results = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)object);
|
results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view.search;
|
package org.eclipse.rse.internal.ui.view.search;
|
||||||
|
@ -56,7 +56,7 @@ public class SystemSearchViewContentProvider implements ITreeContentProvider {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return adapter.getChildren(new NullProgressMonitor(), (IAdaptable)inputElement);
|
return adapter.getChildren((IAdaptable)inputElement, new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.internal.ui.view.team;
|
||||||
|
@ -139,7 +140,7 @@ public class SystemTeamViewCategoryAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this profile.
|
* Return the children of this profile.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
|
SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
|
||||||
ISystemProfile profile = category.getProfile();
|
ISystemProfile profile = category.getProfile();
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view.team;
|
package org.eclipse.rse.internal.ui.view.team;
|
||||||
|
@ -67,7 +68,7 @@ public class SystemTeamViewContentProvider extends WorkbenchContentProvider
|
||||||
{
|
{
|
||||||
ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
|
ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
|
||||||
if (adapter != null)
|
if (adapter != null)
|
||||||
children = adapter.getChildren(new NullProgressMonitor(), (IAdaptable)element);
|
children = adapter.getChildren((IAdaptable)element, new NullProgressMonitor());
|
||||||
else
|
else
|
||||||
children = super.getChildren(element);
|
children = super.getChildren(element);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
package org.eclipse.rse.internal.ui.view.team;
|
||||||
|
@ -213,7 +214,7 @@ public class SystemTeamViewProfileAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this profile.
|
* Return the children of this profile.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
ISystemProfile profile = (ISystemProfile)element;
|
ISystemProfile profile = (ISystemProfile)element;
|
||||||
return getCategoryChildren(profile);
|
return getCategoryChildren(profile);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view.team;
|
package org.eclipse.rse.internal.ui.view.team;
|
||||||
|
@ -166,7 +167,7 @@ public class SystemTeamViewSubSystemConfigurationAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this profile.
|
* Return the children of this profile.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor monitor, IAdaptable element)
|
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
|
SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
|
||||||
SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
|
SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* 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;
|
package org.eclipse.rse.ui.actions;
|
||||||
|
@ -109,7 +110,7 @@ public class SystemCopyToClipboardAction extends SystemBaseAction implements IV
|
||||||
{
|
{
|
||||||
IContainer parentFolder = null;
|
IContainer parentFolder = null;
|
||||||
// corresponds to a folder
|
// 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++)
|
for (int i = 0; i < children.length; i++)
|
||||||
{
|
{
|
||||||
IAdaptable child = (IAdaptable)children[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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.operations;
|
package org.eclipse.rse.ui.operations;
|
||||||
|
@ -206,11 +206,11 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
|
||||||
Object[] children = null;
|
Object[] children = null;
|
||||||
if (_remoteObject instanceof IContextObject)
|
if (_remoteObject instanceof IContextObject)
|
||||||
{
|
{
|
||||||
children = _adapter.getChildren(monitor, (IContextObject)_remoteObject);
|
children = _adapter.getChildren((IContextObject)_remoteObject, monitor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
children = _adapter.getChildren(monitor, (IAdaptable)_remoteObject);
|
children = _adapter.getChildren((IAdaptable)_remoteObject, monitor);
|
||||||
}
|
}
|
||||||
_collector.add(children, monitor);
|
_collector.add(children, monitor);
|
||||||
monitor.done();
|
monitor.done();
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* 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) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.view;
|
package org.eclipse.rse.ui.view;
|
||||||
|
@ -488,7 +489,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
||||||
*/
|
*/
|
||||||
public final Object[] getChildren(Object object)
|
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
|
* This should be overridden by subclasses in order to provide
|
||||||
* deferred query support via the Eclipse Jobs mechanism
|
* deferred query support via the Eclipse Jobs mechanism
|
||||||
* Return the children of this object. Return null if children not supported.
|
* 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 element the model object to get children from
|
||||||
|
* @param monitor the progress monitor
|
||||||
|
*
|
||||||
* @return the children of element
|
* @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
|
* 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
|
* 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.
|
* fall back to the model object version of the method.
|
||||||
*
|
|
||||||
* @param monitor the progress monitor
|
* @param monitor the progress monitor
|
||||||
* @param element the context object that wrappers a model object, it's subsystem and filter reference
|
* @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
|
* @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
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.view;
|
package org.eclipse.rse.ui.view;
|
||||||
|
@ -178,31 +178,29 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the children of this model object.
|
* Return the children of this model object.
|
||||||
*
|
|
||||||
* @param monitor the progress monitor
|
|
||||||
* @param element the model object to query
|
* @param element the model object to query
|
||||||
|
* @param monitor the progress monitor
|
||||||
*
|
*
|
||||||
* @return the children of element
|
* @return the children of element
|
||||||
*
|
*
|
||||||
* The implementation needs to take this into
|
* The implementation needs to take this into
|
||||||
* account so that SWT thread exceptions are avoided.
|
* 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
|
* 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
|
* instead of an adaptable model object, the adapter needs handle both the model object
|
||||||
* as well as the associated filter.
|
* 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 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
|
* @return the children of the model object in contextObject that matches the filter in contextObject
|
||||||
*
|
*
|
||||||
* The implementation needs to take this into
|
* The implementation needs to take this into
|
||||||
* account so that SWT thread exceptions are avoided.
|
* 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
|
* 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) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* 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;
|
package org.eclipse.rse.ui.internal.model;
|
||||||
|
@ -906,15 +907,12 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
||||||
ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
|
ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
|
||||||
profile, oldName);
|
profile, oldName);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Copy a SystemProfile. All connections connection data is copied.
|
/*
|
||||||
* @param monitor Progress monitor to reflect each step of the operation
|
* (non-Javadoc)
|
||||||
* @param profile Source profile to copy
|
* @see org.eclipse.rse.core.model.ISystemRegistry#copySystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
* @param newName Unique name to give copied profile
|
|
||||||
* @param makeActive whether to make the copied profile active or not
|
|
||||||
* @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
|
||||||
{
|
{
|
||||||
Exception lastExc = null;
|
Exception lastExc = null;
|
||||||
boolean failed = false;
|
boolean failed = false;
|
||||||
|
@ -2568,7 +2566,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
||||||
* (non-Javadoc)
|
* (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)
|
* @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;
|
Exception lastExc = null;
|
||||||
boolean failed = false;
|
boolean failed = false;
|
||||||
|
@ -2655,12 +2653,12 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
||||||
* (non-Javadoc)
|
* (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)
|
* @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;
|
IHost newConn = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newConn = copyHost(monitor, conn, targetProfile, newName);
|
newConn = copyHost(conn, targetProfile, newName, monitor);
|
||||||
if (newConn != null)
|
if (newConn != null)
|
||||||
{
|
{
|
||||||
deleteHost(conn); // delete old connection now that new one created successfully
|
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) - [168975] Move RSE Events API to Core
|
||||||
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* 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;
|
package org.eclipse.rse.core.subsystems;
|
||||||
|
@ -1576,7 +1577,7 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||||
IStatus result = Status.OK_STATUS;
|
IStatus result = Status.OK_STATUS;
|
||||||
try {
|
try {
|
||||||
connect(false);
|
connect(monitor, false);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
result = Status.CANCEL_STATUS;
|
result = Status.CANCEL_STATUS;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1989,98 +1990,6 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
return null;
|
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
|
protected void scheduleJob(SubSystemOperationJob job, ISchedulingRule rule) throws InterruptedException
|
||||||
{
|
{
|
||||||
IRunnableContext context = getRunnableContext(/*shell*/); // dwd needed for side effect or for prompt?
|
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 <i>absolute</i> filter string.
|
||||||
* Resolve an absolute filter string. This is only applicable if the subsystem
|
*
|
||||||
* factory reports true for supportsFilters().
|
* 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>
|
* <p>
|
||||||
* When a user expands a filter containing filter strings, this method is
|
* When a user <u>expands a filter</u> this method is invoked for each filter string and the
|
||||||
* invoked for each filter string.
|
* 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>
|
* <p>
|
||||||
* The resulting objects are displayed in the remote system view tree. They
|
* The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.internal.ui.view.SystemView view}.
|
||||||
* can be anything, but at a minimum must support IAdaptable in order to
|
* There are <u>two requirements</u> on the returned objects:</p>
|
||||||
* drive the property sheet. You can just defer the getAdapter request to
|
* <ol>
|
||||||
* the platform's Adapter manager if desired.
|
* <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>
|
* <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 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
|
* @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;
|
boolean ok = true;
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
|
@ -2156,32 +2078,30 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modal thread version of resolve filter strings
|
* Resolve multiple absolute filter strings. This is only applicable if the subsystem
|
||||||
* Resolve an absolute filter string. This is only applicable if the subsystem
|
|
||||||
* factory reports true for supportsFilters().
|
* factory reports true for supportsFilters().
|
||||||
* <p>
|
* <p>
|
||||||
* When a user expands a filter containing filter strings, this method is
|
* This is the same as {@link #resolveFilterString(String, IProgressMonitor)} but takes an array of
|
||||||
* invoked for each filter string.
|
* filter strings versus a single filter string.
|
||||||
* <p>
|
* <p>
|
||||||
* The resulting objects are displayed in the remote system view tree. They
|
* The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}.
|
||||||
* 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>
|
* <p>
|
||||||
* You should supply an adapter class for the returned object's class,
|
* After successful resolve, the sort method is called to sort the concatenated results before
|
||||||
* to render objects in the Remote System Explorer view. It will uses a
|
* returning them.
|
||||||
* 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 filterStrings array of filter patterns for objects to return.
|
||||||
* @param monitor the process monitor associated with this operation
|
* @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
|
* @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
|
throws Exception
|
||||||
{
|
{
|
||||||
boolean ok = true;
|
boolean ok = true;
|
||||||
|
if ((filterStrings == null) || (filterStrings.length == 0)) {
|
||||||
|
SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
ok = promptForPassword();
|
ok = promptForPassword();
|
||||||
if (ok)
|
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.
|
* Resolve a <i>relative</i> filter string.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -2269,29 +2145,30 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
* <p>
|
* <p>
|
||||||
* @param parent Object that is being expanded.
|
* @param parent Object that is being expanded.
|
||||||
* @param filterString filter pattern for children of parent. Typically just "*".
|
* @param filterString filter pattern for children of parent. Typically just "*".
|
||||||
*
|
* @param monitor the process monitor associated with this operation
|
||||||
* @deprecated use resolveFilterString(IProgressMonitor monitor, Object parent, String filterString) instead
|
*
|
||||||
|
* @return Array of objects that are the result of this filter string
|
||||||
*/
|
*/
|
||||||
public Object[] resolveFilterString(Object parent, String filterString)
|
public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
boolean ok = true;
|
boolean ok = true;
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
ok = promptForPassword();
|
ok = promptForPassword();
|
||||||
if (ok)
|
|
||||||
{
|
if (ok)
|
||||||
return internalResolveFilterString(new NullProgressMonitor(), parent, filterString);
|
{
|
||||||
}
|
Object[] results= internalResolveFilterString(monitor, parent, filterString);
|
||||||
else
|
if (sortResults && (results!=null))
|
||||||
{
|
results = sortResolvedFilterStringObjects(results);
|
||||||
return null;
|
return results;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
|
* Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
|
||||||
* true for supportsCommands().
|
* true for supportsCommands().
|
||||||
|
@ -2388,7 +2265,7 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
job.schedule();
|
job.schedule();
|
||||||
job.join();
|
job.join();
|
||||||
} else {
|
} else {
|
||||||
connect(false);
|
connect(false, null);
|
||||||
}
|
}
|
||||||
// Display display = Display.getCurrent();
|
// Display display = Display.getCurrent();
|
||||||
// while (job.getResult() == null) {
|
// 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.
|
* Connect to a remote system with a monitor.
|
||||||
* Required for Bug 176603
|
* 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
|
* Connect to the remote system, optionally forcing a signon prompt even if the password
|
||||||
* is cached in memory or on disk.
|
* is cached in memory or on disk.
|
||||||
* You do not need to override this, as it does the progress monitor and error message
|
* You do not need to override this, as it does the progress monitor and error message
|
||||||
* displaying for you.
|
* displaying for you.
|
||||||
* <p>
|
* <p>
|
||||||
* Override internalConnect if you want, but by default it calls getSystem().connect(IProgressMonitor).
|
* 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).
|
* A convenience method, fully equivalent to promptForPassword(false).
|
||||||
*/
|
*/
|
||||||
public boolean promptForPassword() throws Exception
|
public boolean promptForPassword() throws Exception
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
|
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
|
||||||
|
@ -117,7 +118,7 @@ public class SystemTeamViewCompileCommandAdapter extends AbstractSystemViewAdapt
|
||||||
/**
|
/**
|
||||||
* Return the children of this profile.
|
* Return the children of this profile.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor mon, IAdaptable element) {
|
public Object[] getChildren(IAdaptable element, IProgressMonitor mon) {
|
||||||
//SystemTeamViewCompileCommandNode cmd = (SystemTeamViewCompileCommandNode)element;
|
//SystemTeamViewCompileCommandNode cmd = (SystemTeamViewCompileCommandNode)element;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
|
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
|
||||||
|
@ -118,7 +119,7 @@ public class SystemTeamViewCompileTypeAdapter extends AbstractSystemViewAdapter
|
||||||
/**
|
/**
|
||||||
* Return the children of this profile.
|
* Return the children of this profile.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor mon, IAdaptable element) {
|
public Object[] getChildren(IAdaptable element, IProgressMonitor mon) {
|
||||||
SystemTeamViewCompileTypeNode type = (SystemTeamViewCompileTypeNode) element;
|
SystemTeamViewCompileTypeNode type = (SystemTeamViewCompileTypeNode) element;
|
||||||
SystemCompileCommand[] cmds = type.getCompileType().getCompileCommandsArray();
|
SystemCompileCommand[] cmds = type.getCompileType().getCompileCommandsArray();
|
||||||
SystemTeamViewCompileCommandNode[] nodes = null;
|
SystemTeamViewCompileCommandNode[] nodes = null;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
|
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.
|
* Return the children of this profile.
|
||||||
*/
|
*/
|
||||||
public Object[] getChildren(IProgressMonitor mon, IAdaptable element) {
|
public Object[] getChildren(IAdaptable element, IProgressMonitor mon) {
|
||||||
//SystemUDActionElement action = (SystemUDActionElement)element;
|
//SystemUDActionElement action = (SystemUDActionElement)element;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.rse.internal.useractions.ui.uda;
|
package org.eclipse.rse.internal.useractions.ui.uda;
|
||||||
|
|
||||||
|
@ -526,7 +527,7 @@ public abstract class SystemUDActionSubsystem implements ISystemSubstitutor {
|
||||||
if (cmdSubSystem != null) {
|
if (cmdSubSystem != null) {
|
||||||
ok = true;
|
ok = true;
|
||||||
try {
|
try {
|
||||||
cmdSubSystem.runCommand(new NullProgressMonitor(), cmdString, context);
|
cmdSubSystem.runCommand(cmdString, context, new NullProgressMonitor());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SystemBasePlugin.logError("RunUserAction", e); //$NON-NLS-1$
|
SystemBasePlugin.logError("RunUserAction", e); //$NON-NLS-1$
|
||||||
SystemMessageDialog.displayExceptionMessage(shell, e);
|
SystemMessageDialog.displayExceptionMessage(shell, e);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Don Yantzi (IBM) - initial contribution.
|
* Don Yantzi (IBM) - initial contribution.
|
||||||
* David Dykstal (IBM) - initial contribution.
|
* David Dykstal (IBM) - initial contribution.
|
||||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by 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.tests.core.connection;
|
package org.eclipse.rse.tests.core.connection;
|
||||||
|
|
||||||
|
@ -176,7 +177,7 @@ public class RSEConnectionTestCase extends RSEBaseConnectionTestCase {
|
||||||
|
|
||||||
Object[] objects = null;
|
Object[] objects = null;
|
||||||
try {
|
try {
|
||||||
objects = subsystem.resolveFilterString(null, "/bin/*"); //$NON-NLS-1$
|
objects = subsystem.resolveFilterString("/bin/*", null); //$NON-NLS-1$
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
exception = e;
|
exception = e;
|
||||||
cause = e.getLocalizedMessage();
|
cause = e.getLocalizedMessage();
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Tobias Schwarz (Wind River) - initial API and implementation
|
* Tobias Schwarz (Wind River) - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.rse.tests.internal.testsubsystem;
|
package org.eclipse.rse.tests.internal.testsubsystem;
|
||||||
|
|
||||||
|
@ -125,7 +126,7 @@ public class TestSubSystemNodeAdapter extends AbstractSystemViewAdapter
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
|
* @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))
|
if (isTestSubSystemNodeContainer(element))
|
||||||
return ((ITestSubSystemNodeContainer)element).getChildNodes();
|
return ((ITestSubSystemNodeContainer)element).getChildNodes();
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - initial API and implementation
|
* Martin Oberhuber (Wind River) - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.rse.tests.subsystems.files;
|
package org.eclipse.rse.tests.subsystems.files;
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
|
||||||
|
|
||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
try {
|
try {
|
||||||
fs.delete(mon, tempDir.getParent(), tempDir.getName());
|
fs.delete(tempDir.getParent(), tempDir.getName(), mon);
|
||||||
} catch(SystemMessageException msg) {
|
} catch(SystemMessageException msg) {
|
||||||
assertFalse("Exception: "+msg.getLocalizedMessage(), true); //$NON-NLS-1$
|
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$
|
if (!RSETestsPlugin.isTestCaseEnabled("FileServiceTest.testCreateFile")) return; //$NON-NLS-1$
|
||||||
|
|
||||||
String testName = getTestFileName();
|
String testName = getTestFileName();
|
||||||
IHostFile hf = fs.createFile(mon, tempDirPath, testName);
|
IHostFile hf = fs.createFile(tempDirPath, testName, mon);
|
||||||
assertTrue(hf.exists());
|
assertTrue(hf.exists());
|
||||||
assertTrue(hf.canRead());
|
assertTrue(hf.canRead());
|
||||||
assertTrue(hf.canWrite());
|
assertTrue(hf.canWrite());
|
||||||
|
@ -119,21 +120,21 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
|
||||||
|
|
||||||
String testName = getTestFileName();
|
String testName = getTestFileName();
|
||||||
String testName2 = testName.toUpperCase();
|
String testName2 = testName.toUpperCase();
|
||||||
IHostFile hf = fs.createFile(mon, tempDirPath, testName);
|
IHostFile hf = fs.createFile(tempDirPath, testName, mon);
|
||||||
if (fss.isCaseSensitive()) {
|
if (fss.isCaseSensitive()) {
|
||||||
//UNIX: uppercase version must be distinct
|
//UNIX: uppercase version must be distinct
|
||||||
IHostFile hf2 = fs.getFile(mon, tempDirPath, testName2);
|
IHostFile hf2 = fs.getFile(tempDirPath, testName2, mon);
|
||||||
assertFalse(hf2.exists());
|
assertFalse(hf2.exists());
|
||||||
hf2 = fs.createFolder(mon, tempDirPath, testName2);
|
hf2 = fs.createFolder(tempDirPath, testName2, mon);
|
||||||
assertTrue(hf2.exists());
|
assertTrue(hf2.exists());
|
||||||
assertTrue(hf2.isDirectory());
|
assertTrue(hf2.isDirectory());
|
||||||
assertFalse(hf.equals(hf2));
|
assertFalse(hf.equals(hf2));
|
||||||
} else {
|
} else {
|
||||||
//Windows: uppercase version must be the same
|
//Windows: uppercase version must be the same
|
||||||
IHostFile hf2 = fs.getFile(mon, tempDirPath, testName2);
|
IHostFile hf2 = fs.getFile(tempDirPath, testName2, mon);
|
||||||
assertTrue(hf2.exists());
|
assertTrue(hf2.exists());
|
||||||
try {
|
try {
|
||||||
hf2 = fs.createFolder(mon, tempDirPath, testName2);
|
hf2 = fs.createFolder(tempDirPath, testName2, mon);
|
||||||
} catch(SystemMessageException e) {
|
} catch(SystemMessageException e) {
|
||||||
//Windows cannot create a folder when the file is already there
|
//Windows cannot create a folder when the file is already there
|
||||||
assertNotNull(e);
|
assertNotNull(e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue