Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-05-25 21:31:40 +0000
committerDarin Wright2006-05-25 21:31:40 +0000
commit856f76d8909303c14f0537134069e78e7ee20bb2 (patch)
treefd2542708d1b3e2f8139cddbc2f926f4b8723df8
parent30ed41775fc029244aed50207d95a76bfcb3ef09 (diff)
downloadeclipse.platform.debug-856f76d8909303c14f0537134069e78e7ee20bb2.tar.gz
eclipse.platform.debug-856f76d8909303c14f0537134069e78e7ee20bb2.tar.xz
eclipse.platform.debug-856f76d8909303c14f0537134069e78e7ee20bb2.zip
Bug 143812 - [Memory View] Memory View's tree viewer handles any terminate event
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java43
1 files changed, 23 insertions, 20 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
index 04fe7b536..0199442c0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
@@ -209,29 +209,32 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC
if (event.getKind() == DebugEvent.TERMINATE)
{
- IMemoryBlockRetrieval srcRetrieval = getMemoryBlockRetrieval(event.getSource());
- if (srcRetrieval == fRetrieval)
+ // should only handle the terminate event if the target is terminated
+ if (event.getSource() instanceof IDebugTarget)
{
- // #setInput must be done on the UI thread
- UIJob job = new UIJob("setInput"){ //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- // if viewpane is disposed, do not handle event
- if (fTreeViewer.getContentProvider() == null)
- return Status.OK_STATUS;
+ IMemoryBlockRetrieval srcRetrieval = getMemoryBlockRetrieval(event.getSource());
+ if (srcRetrieval == fRetrieval)
+ {
+ // #setInput must be done on the UI thread
+ UIJob job = new UIJob("setInput"){ //$NON-NLS-1$
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ // if viewpane is disposed, do not handle event
+ if (fTreeViewer.getContentProvider() == null)
+ return Status.OK_STATUS;
+
+ fTreeViewer.setInput(null);
+ return Status.OK_STATUS;
+ }};
- fTreeViewer.setInput(null);
- return Status.OK_STATUS;
- }};
-
- job.setSystem(true);
- job.schedule();
+ job.setSystem(true);
+ job.schedule();
+ }
+
+ IMemoryBlockRetrieval retrieval = getMemoryBlockRetrieval(event.getSource());
+ if (retrieval != null)
+ fViewerState.remove(retrieval);
}
-
- IMemoryBlockRetrieval retrieval = getMemoryBlockRetrieval(event.getSource());
- if (retrieval != null)
- fViewerState.remove(retrieval);
-
}
}

Back to the top