From a8d15bf226dc2f9a40658df9c2308f136410e958 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Thu, 7 Dec 2006 19:35:45 +0000 Subject: [PATCH] [160353] avoid nested look in connect --- .../org/eclipse/rse/core/subsystems/SubSystem.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java index 61ef98f875b..2dbe08985e3 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java @@ -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); } }