mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-19 14:15:50 +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;
|
package org.eclipse.rse.core.model;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
|
||||||
|
|
||||||
public interface IRSECallback {
|
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.
|
* Connect to the remote system. Does not force a prompt for a password.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public void connect() throws Exception;
|
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
|
* Connect to the remote system from a background job
|
||||||
*
|
*
|
||||||
* @param monitor the process monitor
|
* @param monitor the process monitor
|
||||||
*/
|
*/
|
||||||
public void connect(IProgressMonitor monitor) throws Exception;
|
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
|
* 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)
|
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.
|
* 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).
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public void connect() throws Exception {
|
public void connect() throws Exception {
|
||||||
if (!isConnected()) {
|
if (!isConnected()) {
|
||||||
|
@ -2417,6 +2424,9 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
connect(false, callback);
|
connect(false, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
public void connect(boolean forcePrompt) throws Exception
|
public void connect(boolean forcePrompt) throws Exception
|
||||||
{
|
{
|
||||||
connect(forcePrompt, null);
|
connect(forcePrompt, null);
|
||||||
|
|
Loading…
Add table
Reference in a new issue