Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-10-01 11:54:21 -0400
committerUwe Stieber2013-10-01 11:54:21 -0400
commit51eb66bb5a1ea21b4ff3f240b43043241e0e6254 (patch)
tree738f1c98a64d67f59d0b12b535e5c7c9551cdee8 /target_explorer
parenteaae7765d4c380128ed6c01740052dd40f33c8d8 (diff)
downloadorg.eclipse.tcf-51eb66bb5a1ea21b4ff3f240b43043241e0e6254.tar.gz
org.eclipse.tcf-51eb66bb5a1ea21b4ff3f240b43043241e0e6254.tar.xz
org.eclipse.tcf-51eb66bb5a1ea21b4ff3f240b43043241e0e6254.zip
Target Explorer: Fix debug service returning to early
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java29
1 files changed, 25 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
index c461a4b5b..69b91bc93 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
@@ -18,6 +18,7 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchListener;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.ILaunchesListener;
import org.eclipse.debug.ui.DebugUITools;
@@ -114,14 +115,34 @@ public class DebugService extends AbstractService implements IDebugService {
}
if (!skip) {
- config = LaunchManager.getInstance().createOrUpdateLaunchConfiguration(config, launchSpec);
+ final ILaunchConfiguration finConfig = LaunchManager.getInstance().createOrUpdateLaunchConfiguration(config, launchSpec);
- delegate.validate(ILaunchManager.DEBUG_MODE, config);
- DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
+ delegate.validate(ILaunchManager.DEBUG_MODE, finConfig);
+
+ DebugPlugin.getDefault().getLaunchManager().addLaunchListener(new ILaunchListener() {
+ @Override
+ public void launchAdded(ILaunch launch) {
+ if (launch != null && finConfig.equals(launch.getLaunchConfiguration())) {
+ DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
+ callback.done(this, Status.OK_STATUS);
+ }
+ }
+
+ @Override
+ public void launchChanged(ILaunch launch) {
+ }
+
+ @Override
+ public void launchRemoved(ILaunch launch) {
+ }
+ });
+
+ DebugUITools.launch(finConfig, ILaunchManager.DEBUG_MODE);
+ } else {
+ callback.done(this, Status.OK_STATUS);
}
}
}
- callback.done(this, Status.OK_STATUS);
}
catch (Exception e) {
callback.done(this, StatusHelper.getStatus(e));

Back to the top