Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2009-05-11 14:33:39 -0400
committerDarin Wright2009-05-11 14:33:39 -0400
commitf6759287cdcf9998c6c0eb77a1ec8ffc7a326137 (patch)
tree0841897b0c446c05ee8489885df02b42e34bc08d
parent0c355a92b49d603d83ea924e4ea7fd61eb4a1b7d (diff)
downloadeclipse.platform.debug-f6759287cdcf9998c6c0eb77a1ec8ffc7a326137.tar.gz
eclipse.platform.debug-f6759287cdcf9998c6c0eb77a1ec8ffc7a326137.tar.xz
eclipse.platform.debug-f6759287cdcf9998c6c0eb77a1ec8ffc7a326137.zip
Bug 275614 - REGRESSION: threads no longer expanded if Debug view not visible
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java19
2 files changed, 15 insertions, 10 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
index 221d499a6..282701ab6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
@@ -194,9 +194,9 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
System.out.println("[expand] setChildCount(" + delta.getElement() + ", (model) " + childCount + " (view) " + viewCount); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
treeViewer.setChildCount(elementPath, viewCount);
- }
- if (!treeViewer.getExpandedState(elementPath)) {
- treeViewer.expandToLevel(elementPath, 1);
+ if (!treeViewer.getExpandedState(elementPath)) {
+ treeViewer.expandToLevel(elementPath, 1);
+ }
}
}
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 b8ba83927..88c643fee 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
@@ -78,13 +78,18 @@ public class DebugTargetProxy extends EventHandlerModelProxy {
if (target != null) {
ModelDelta delta = getNextSuspendedThreadDelta(null, false);
if (delta == null) {
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- ILaunch launch = target.getLaunch();
- int launchIndex = indexOf(manager.getLaunches(), target.getLaunch());
- int targetIndex = indexOf(target.getLaunch().getChildren(), target);
- delta = new ModelDelta(manager, IModelDelta.NO_CHANGE);
- ModelDelta node = delta.addNode(launch, launchIndex, IModelDelta.NO_CHANGE, target.getLaunch().getChildren().length);
- node = node.addNode(target, targetIndex, IModelDelta.EXPAND | IModelDelta.SELECT, -1);
+ try {
+ ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunch launch = target.getLaunch();
+ int launchIndex = indexOf(manager.getLaunches(), target.getLaunch());
+ int targetIndex = indexOf(target.getLaunch().getChildren(), target);
+ delta = new ModelDelta(manager, IModelDelta.NO_CHANGE);
+ ModelDelta node = delta.addNode(launch, launchIndex, IModelDelta.NO_CHANGE, target.getLaunch().getChildren().length);
+ node = node.addNode(target, targetIndex, IModelDelta.EXPAND | IModelDelta.SELECT, target.getThreads().length);
+ } catch (DebugException e) {
+ // In case of exception do not fire delta
+ return;
+ }
}
// expand the target if no suspended thread
fireModelChanged(delta);

Back to the top