From 7f470070eb63370e0b8d358a5c1080fcf37aea8d Mon Sep 17 00:00:00 2001 From: Anna Dushistova Date: Thu, 19 Feb 2009 09:37:19 +0000 Subject: [PATCH] [265236] Applied patch from Nikita Shulga. --- .../org/eclipse/rse/internal/remotecdt/Messages.java | 3 +++ .../internal/remotecdt/RemoteRunLaunchDelegate.java | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/Messages.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/Messages.java index b8960830470..ea0b526f0eb 100644 --- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/Messages.java +++ b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/Messages.java @@ -11,6 +11,7 @@ * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path * Anna Dushistova (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch + * Nikita Shulga (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list *******************************************************************************/ package org.eclipse.rse.internal.remotecdt; @@ -49,6 +50,8 @@ public class Messages extends NLS { public static String RemoteRunLaunchDelegate_RemoteShell; public static String RemoteRunLaunchDelegate_1; + public static String RemoteRunLaunchDelegate_10; + public static String RemoteRunLaunchDelegate_12; public static String RemoteRunLaunchDelegate_13; diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java index 1558da4f9cd..aee20da759c 100644 --- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java +++ b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/internal/remotecdt/RemoteRunLaunchDelegate.java @@ -14,6 +14,7 @@ * Anna Dushistova (MontaVista) - [235298][remotecdt] Further improve progress reporting and cancellation of Remote CDT Launch * Anna Dushistova (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch + * Nikita Shulga (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list *******************************************************************************/ package org.eclipse.rse.internal.remotecdt; @@ -91,6 +92,15 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate { if (monitor == null) monitor = new NullProgressMonitor(); + if (!RSECorePlugin.isInitComplete(RSECorePlugin.INIT_MODEL)) { + monitor.subTask(Messages.RemoteRunLaunchDelegate_10); + try { + RSECorePlugin.waitForInitCompletion(RSECorePlugin.INIT_MODEL); + } catch (InterruptedException e) { + throw new CoreException(new Status(IStatus.ERROR, getPluginID(), + IStatus.OK, e.getLocalizedMessage(), e)); + } + } if (mode.equals(ILaunchManager.DEBUG_MODE)) { monitor.beginTask(Messages.RemoteRunLaunchDelegate_0, 100); setDefaultSourceLocator(launch, config);