mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
[176603] connect(IProgressMonitor, boolean forcePrompt)
This commit is contained in:
parent
e321ca933f
commit
f6e7310a3a
2 changed files with 29 additions and 3 deletions
|
@ -27,7 +27,6 @@ import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.core.model.IPropertySet;
|
import org.eclipse.rse.core.model.IPropertySet;
|
||||||
import org.eclipse.rse.core.model.IRSECallback;
|
import org.eclipse.rse.core.model.IRSECallback;
|
||||||
import org.eclipse.rse.core.model.IRSEModelObject;
|
import org.eclipse.rse.core.model.IRSEModelObject;
|
||||||
import org.eclipse.rse.core.model.IRSEPersistableContainer;
|
|
||||||
import org.eclipse.rse.core.model.ISystemProfile;
|
import org.eclipse.rse.core.model.ISystemProfile;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
|
|
||||||
|
@ -378,9 +377,20 @@ public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, I
|
||||||
* 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
|
||||||
|
*
|
||||||
|
* @deprecated use connect(IProgressMonitor, boolean)
|
||||||
*/
|
*/
|
||||||
public void connect(IProgressMonitor monitor) throws Exception;
|
public void connect(IProgressMonitor monitor) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to the remote system from a background job
|
||||||
|
*
|
||||||
|
* @param monitor the process monitor
|
||||||
|
* @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
|
||||||
|
* in memory
|
||||||
|
*/
|
||||||
|
public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the remote system on a background job. The callback is
|
* Connect to the remote system on a background job. The callback is
|
||||||
|
|
|
@ -2382,8 +2382,22 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required for Bug 176603
|
* Required for Bug 176603
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public void connect(IProgressMonitor monitor) throws Exception
|
public void connect(IProgressMonitor monitor) throws Exception
|
||||||
|
{
|
||||||
|
connect(monitor, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to a remote system with a monitor.
|
||||||
|
* Required for Bug 176603
|
||||||
|
*
|
||||||
|
* @param monitor the progress monitor
|
||||||
|
* @param forcePrompt indicates whether to prompt even if password is in memory
|
||||||
|
*/
|
||||||
|
public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception
|
||||||
{
|
{
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
{
|
{
|
||||||
|
@ -2392,13 +2406,15 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
|
msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
|
||||||
SystemBasePlugin.logInfo(msg);
|
SystemBasePlugin.logInfo(msg);
|
||||||
monitor.beginTask(msg, 10);
|
monitor.beginTask(msg, 10);
|
||||||
|
final boolean promptForPassword = forcePrompt;
|
||||||
|
|
||||||
final Exception[] exception=new Exception[1];
|
final Exception[] exception=new Exception[1];
|
||||||
exception[0]=null;
|
exception[0]=null;
|
||||||
Display.getDefault().syncExec(new Runnable() {
|
Display.getDefault().syncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try
|
||||||
promptForPassword();
|
{
|
||||||
|
promptForPassword(promptForPassword);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
exception[0]=e;
|
exception[0]=e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue