mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
[166338] initial pass at IRSECallback
This commit is contained in:
parent
db0f7ceaf2
commit
b92439faf4
3 changed files with 28 additions and 13 deletions
|
@ -13,10 +13,9 @@
|
|||
********************************************************************************/
|
||||
package org.eclipse.rse.core.model;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
|
||||
public interface IRSECallback {
|
||||
|
||||
public void operationComplete(String operationName, ISubSystem subsystem, IProgressMonitor monitor);
|
||||
public void done(IStatus status, Object result);
|
||||
}
|
||||
|
|
|
@ -351,25 +351,31 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
|
|||
|
||||
/**
|
||||
* Connect to the remote system. Does not force a prompt for a password.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public void connect() throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Connect to the remote system, optionally forcing a signon prompt even if the password
|
||||
* is cached in memory or on disk.
|
||||
*
|
||||
* @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
|
||||
* in memory.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public void connect(boolean forcePrompt) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Connect to the remote system from a background job
|
||||
*
|
||||
* @param monitor the process monitor
|
||||
*/
|
||||
public void connect(IProgressMonitor monitor) throws Exception;
|
||||
|
||||
/**
|
||||
* Connect to the remote system, optionally forcing a signon prompt even if the password
|
||||
* is cached in memory or on disk.
|
||||
*
|
||||
* @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
|
||||
* in memory.
|
||||
*/
|
||||
public void connect(boolean forcePrompt) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Connect to the remote system on a background job. The callback is
|
||||
|
|
|
@ -1595,7 +1595,12 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
|
||||
if (_callback != null)
|
||||
{
|
||||
_callback.operationComplete(this.getName(), _ss, mon);
|
||||
IStatus status = Status.OK_STATUS;
|
||||
if (!isConnected())
|
||||
{
|
||||
status = Status.CANCEL_STATUS;
|
||||
}
|
||||
_callback.done(status, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2345,6 +2350,8 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
* displaying for you.
|
||||
* <p>
|
||||
* Override internalConnect if you want, but by default it calls getSystem().connect(IProgressMonitor).
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public void connect() throws Exception {
|
||||
if (!isConnected()) {
|
||||
|
@ -2417,6 +2424,9 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
connect(false, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public void connect(boolean forcePrompt) throws Exception
|
||||
{
|
||||
connect(forcePrompt, null);
|
||||
|
|
Loading…
Add table
Reference in a new issue