Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-08-11 20:24:14 +0000
committerDarin Wright2008-08-11 20:24:14 +0000
commit8883ea563f7a502af92217d5c3551916f66cec12 (patch)
treec54f41fa0b2e946fefaa808d61476da5e40ab9a1
parent38986f03034efc24431d9c567ba7ae8868becfea (diff)
downloadeclipse.platform.debug-8883ea563f7a502af92217d5c3551916f66cec12.tar.gz
eclipse.platform.debug-8883ea563f7a502af92217d5c3551916f66cec12.tar.xz
eclipse.platform.debug-8883ea563f7a502af92217d5c3551916f66cec12.zip
Bug 243606 - [Debug View] Stackframe does not get focus with multiple debug targets
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
index a54b43531..2ad314d65 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
@@ -81,8 +81,9 @@ public class DebugTargetProxy extends EventHandlerModelProxy {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunch launch = target.getLaunch();
int launchIndex = indexOf(manager.getLaunches(), target.getLaunch());
+ int targetIndex = indexOf(target.getLaunch().getChildren(), target);
IThread chosen = null;
- int index = -1;
+ int threadIndex = -1;
// select the first thread with a breakpoint, or the first suspended thread
// if none have breakpoints
for (int i = 0; i < threads.length; i++) {
@@ -91,12 +92,12 @@ public class DebugTargetProxy extends EventHandlerModelProxy {
IBreakpoint[] bps = thread.getBreakpoints();
if (bps != null && bps.length > 0) {
chosen = thread;
- index = i;
+ threadIndex = i;
break;
} else {
if (chosen == null) {
chosen = thread;
- index = i;
+ threadIndex = i;
}
}
}
@@ -106,8 +107,8 @@ public class DebugTargetProxy extends EventHandlerModelProxy {
if (frame != null) {
ModelDelta delta = new ModelDelta(manager, IModelDelta.NO_CHANGE);
ModelDelta node = delta.addNode(launch, launchIndex, IModelDelta.NO_CHANGE, target.getLaunch().getChildren().length);
- node = node.addNode(target, 0, IModelDelta.NO_CHANGE, threads.length);
- node = node.addNode(chosen, index, IModelDelta.NO_CHANGE | IModelDelta.EXPAND, chosen.getStackFrames().length);
+ node = node.addNode(target, targetIndex, IModelDelta.NO_CHANGE, threads.length);
+ node = node.addNode(chosen, threadIndex, IModelDelta.NO_CHANGE | IModelDelta.EXPAND, chosen.getStackFrames().length);
node = node.addNode(frame, 0, IModelDelta.NO_CHANGE | IModelDelta.SELECT, 0);
fireModelChanged(delta);
return;
@@ -116,7 +117,7 @@ public class DebugTargetProxy extends EventHandlerModelProxy {
// expand the target if no suspended thread
ModelDelta delta = new ModelDelta(manager, IModelDelta.NO_CHANGE);
ModelDelta node = delta.addNode(launch, launchIndex, IModelDelta.NO_CHANGE, target.getLaunch().getChildren().length);
- node = node.addNode(target, 0, IModelDelta.EXPAND | IModelDelta.SELECT, threads.length);
+ node = node.addNode(target, targetIndex, IModelDelta.EXPAND | IModelDelta.SELECT, threads.length);
fireModelChanged(delta);
} catch (DebugException e) {
}

Back to the top