Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-05-09 15:21:23 -0400
committerDarin Wright2006-05-09 15:21:23 -0400
commit6d840573be79981c562b5d77173313f224be548a (patch)
treeb71dcefe7a42b898779f04b49acaa37794d3c973
parentc2c132bd5465a5b660ac218ddb3c25b032a94477 (diff)
downloadeclipse.platform.debug-6d840573be79981c562b5d77173313f224be548a.tar.gz
eclipse.platform.debug-6d840573be79981c562b5d77173313f224be548a.tar.xz
eclipse.platform.debug-6d840573be79981c562b5d77173313f224be548a.zip
Bug 139593 - Expression View does not clean up children when an expression becomes invalid
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeModel.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchTreeModel.java13
3 files changed, 8 insertions, 16 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
index de7aa7fcc..a59301271 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
@@ -82,7 +82,7 @@ public abstract class AsynchronousModel {
}
}
- private IAsynchronousContentAdapter fEmptyContentAdapter = new EmptyContentAdapter();
+ protected IAsynchronousContentAdapter fEmptyContentAdapter = new EmptyContentAdapter();
/**
* List of requests currently being performed.
@@ -455,9 +455,6 @@ public abstract class AsynchronousModel {
IAdaptable adaptable = (IAdaptable) element;
adapter = (IAsynchronousContentAdapter) adaptable.getAdapter(IAsynchronousContentAdapter.class);
}
- if (adapter == null) {
- adapter = fEmptyContentAdapter;
- }
return adapter;
}
@@ -470,6 +467,9 @@ public abstract class AsynchronousModel {
public void updateChildren(ModelNode parent) {
Object element = parent.getElement();
IAsynchronousContentAdapter adapter = getContentAdapter(element);
+ if (adapter == null) {
+ adapter = fEmptyContentAdapter;
+ }
if (adapter != null) {
IChildrenRequestMonitor update = new ChildrenRequestMonitor(parent, this);
requestScheduled(update);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeModel.java
index b4e0d4719..1de61a647 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTreeModel.java
@@ -229,6 +229,9 @@ public class AsynchronousTreeModel extends AsynchronousModel {
protected void updateHasChildren(ModelNode node) {
Object element = node.getElement();
IAsynchronousContentAdapter adapter = getContentAdapter(element);
+ if (adapter == null) {
+ adapter = fEmptyContentAdapter;
+ }
if (adapter != null) {
IContainerRequestMonitor update = new ContainerRequestMonitor(node, this);
requestScheduled(update);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchTreeModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchTreeModel.java
index cb367c7bf..f0efde715 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchTreeModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchTreeModel.java
@@ -52,7 +52,7 @@ public class LaunchTreeModel extends AsynchronousTreeModel {
return legacyAdapter;
}
- return new BogusTreeAdapter();
+ return null;
}
/**
@@ -169,15 +169,4 @@ public class LaunchTreeModel extends AsynchronousTreeModel {
}
- private class BogusTreeAdapter extends AsynchronousContentAdapter {
- protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
- return new Object[0];
- }
- protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
- return false;
- }
- protected boolean supportsPartId(String id) {
- return false;
- }
- }
}

Back to the top