Skip to main content
summaryrefslogtreecommitdiffstats
path: root/memory
diff options
context:
space:
mode:
authorPawel Piech2010-07-14 14:18:13 -0400
committerPawel Piech2010-07-14 14:18:13 -0400
commit016c840b51ad7a1ba0ef2ac3a8325a564d071eb1 (patch)
treec2198384093b18bf7fd3a7dec1d7a37aec9a9141 /memory
parentae0d3003999bcd615282e4fbfc67c01e6eb7c499 (diff)
downloadorg.eclipse.cdt-016c840b51ad7a1ba0ef2ac3a8325a564d071eb1.tar.gz
org.eclipse.cdt-016c840b51ad7a1ba0ef2ac3a8325a564d071eb1.tar.xz
org.eclipse.cdt-016c840b51ad7a1ba0ef2ac3a8325a564d071eb1.zip
Bug 319890 - [memory] When nothing is selected in Debug view, memory browser still shows data
Diffstat (limited to 'memory')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java43
1 files changed, 24 insertions, 19 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
index c686c3c6a2..f76c4308c8 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
@@ -780,31 +780,36 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
if(defaultRenderingTypeId == null)
return;
+ IAdaptable adaptable = null;
+ IMemoryBlockRetrieval retrieval = null;
+ ILaunch launch = null;
+
if(context instanceof IAdaptable)
{
- IAdaptable adaptable = (IAdaptable) context;
- final IMemoryBlockRetrieval retrieval = ((IMemoryBlockRetrieval) adaptable.getAdapter(IMemoryBlockRetrieval.class));
- ILaunch launch = ((ILaunch) adaptable.getAdapter(ILaunch.class));
-
- if(retrieval != null && launch != null && !launch.isTerminated()) {
- if (retrieval instanceof IMemorySpaceAwareMemoryBlockRetrieval) {
- ((IMemorySpaceAwareMemoryBlockRetrieval)retrieval).getMemorySpaces(context, new GetMemorySpacesRequest(){
- public void done() {
- updateTab(retrieval, context, isSuccess() ? getMemorySpaces() : new String[0]);
- }
- });
- }
- else {
- updateTab(retrieval, context, new String[0]);
- }
+ adaptable = (IAdaptable) context;
+ retrieval = ((IMemoryBlockRetrieval) adaptable.getAdapter(IMemoryBlockRetrieval.class));
+ launch = ((ILaunch) adaptable.getAdapter(ILaunch.class));
+ }
+
+ if(retrieval != null && launch != null && !launch.isTerminated()) {
+ if (retrieval instanceof IMemorySpaceAwareMemoryBlockRetrieval) {
+ final IMemoryBlockRetrieval _retrieval = retrieval;
+ ((IMemorySpaceAwareMemoryBlockRetrieval)retrieval).getMemorySpaces(context, new GetMemorySpacesRequest(){
+ public void done() {
+ updateTab(_retrieval, context, isSuccess() ? getMemorySpaces() : new String[0]);
+ }
+ });
}
else {
- handleUnsupportedSelection();
+ updateTab(retrieval, context, new String[0]);
}
-
- fGotoMemorySpaceControl.pack(true);
- fStackLayout.topControl.getParent().layout(true);
}
+ else {
+ handleUnsupportedSelection();
+ }
+
+ fGotoMemorySpaceControl.pack(true);
+ fStackLayout.topControl.getParent().layout(true);
}
/**

Back to the top