mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
[160353] avoid nested look in connect
This commit is contained in:
parent
4a9fb5a754
commit
a8d15bf226
1 changed files with 7 additions and 7 deletions
|
@ -1579,9 +1579,11 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
*/
|
||||
public class ConnectJob extends SubSystemOperationJob
|
||||
{
|
||||
public ConnectJob()
|
||||
private SubSystem _ss;
|
||||
public ConnectJob(SubSystem ss)
|
||||
{
|
||||
super(GenericMessages.RSESubSystemOperation_Connect_message);
|
||||
_ss = ss;
|
||||
}
|
||||
|
||||
public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
|
||||
|
@ -1594,6 +1596,8 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
|
||||
if (!implicitConnect(true, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
|
||||
internalConnect(mon);
|
||||
|
||||
RSEUIPlugin.getTheSystemRegistry().connectedStatusChange(_ss, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2551,12 +2555,8 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
//dwd ((ProgressMonitorDialog) runnableContext).setCancelable(true);
|
||||
//dwd }
|
||||
getConnectorService().promptForPassword(forcePrompt); // prompt for userid and password
|
||||
ConnectJob job = new ConnectJob();
|
||||
scheduleJob(job, null, shell != null);
|
||||
IStatus status = job.getResult();
|
||||
if (status != null && status.isOK()) {
|
||||
registry.connectedStatusChange(this, true, false);
|
||||
}
|
||||
ConnectJob job = new ConnectJob(this);
|
||||
scheduleJob(job, null, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue