From e925b3380b3516417897d67d555f76c4bf692689 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Thu, 25 Oct 2007 21:03:56 +0000 Subject: [PATCH] [207095] Implicit connect needs to run in the same job as caller --- .../rse/core/subsystems/SubSystem.java | 21 ++++++++++++------- 1 file changed, 14 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 7799fe81645..e61b6fd06e8 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 @@ -476,22 +476,29 @@ public abstract class SubSystem extends RSEModelObject * will throw a SystemMessageException you can easily display to the user by using a method * in it. */ - public void checkIsConnected() throws SystemMessageException + public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException { if (!isConnected()) { try { - Display display = Display.getCurrent(); - if (display != null) + if (monitor != null) { - connect(false, null); + connect(monitor, false); } else { - // Not on UI-thread - connect(new NullProgressMonitor(), false); - } + Display display = Display.getCurrent(); + if (display != null) + { + connect(false, null); + } + else + { + // Not on UI-thread + connect(new NullProgressMonitor(), false); + } + } } catch (Exception e) {