Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2004-11-23 14:23:10 +0000
committerDarin Wright2004-11-23 14:23:10 +0000
commit5df3b0343234072bda561c1f5038b7e2c02ed093 (patch)
treed8fbd25c0e3ccb9a736b32d544ba4be6f733b7f5
parent10fc3a4094039bf473185ae057bfdc5b01c601b3 (diff)
downloadeclipse.platform.debug-5df3b0343234072bda561c1f5038b7e2c02ed093.tar.gz
eclipse.platform.debug-5df3b0343234072bda561c1f5038b7e2c02ed093.tar.xz
eclipse.platform.debug-5df3b0343234072bda561c1f5038b7e2c02ed093.zip
Bug 78881- NullPointerException in memory view when selecting watch expressions
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingAction.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/CreateRenderingTab.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewPane.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java3
7 files changed, 25 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
index acaaad288..e52fa2299 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
@@ -219,6 +219,9 @@ public abstract class AbstractMemoryViewPane implements IMemoryBlockListener, IS
memRetrieval = debugTarget;
}
+ if (memRetrieval == null)
+ return;
+
//if we've got a tabfolder to go with the IMemoryBlockRetrieval, display it
if (fTabFolderForDebugView.containsKey(memRetrieval)) {
if (fStackLayout.topControl != (TabFolder)fTabFolderForDebugView.get(memRetrieval)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
index 329a1bf72..b41f398f7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
@@ -152,6 +152,9 @@ public class AddMemoryBlockAction extends Action implements ISelectionListener,
standardMemRetrieval = debugTarget;
}
+ if (standardMemRetrieval == null)
+ return;
+
Shell shell= DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
// create dialog to ask for expression/address to block
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingAction.java
index 47c131b12..df31a0a32 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingAction.java
@@ -71,6 +71,9 @@ public class AddMemoryRenderingAction extends AddMemoryBlockAction {
standardMemRetrieval = debugTarget;
}
+ if (standardMemRetrieval == null)
+ return;
+
// add memory renderings to Memory Rendering Manager
for (int i=0; i<renderings.length; i++)
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/CreateRenderingTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/CreateRenderingTab.java
index 065fb9162..6f4357c95 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/CreateRenderingTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/CreateRenderingTab.java
@@ -318,6 +318,9 @@ public class CreateRenderingTab implements IMemoryViewTab, IDebugEventSetListene
standardMemRetrieval = debugTarget;
}
+ if (standardMemRetrieval == null)
+ return;
+
// add memory renderings to Memory Rendering Manager
for (int i=0; i<renderings.length; i++)
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewPane.java
index 77015d383..562b8e6d8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewPane.java
@@ -153,6 +153,9 @@ public class MemoryViewPane extends AbstractMemoryViewPane {
retrieve = debugTarget;
fKey = retrieve;
+
+ if (fKey == null)
+ return;
if (debugTarget == null ||debugTarget.isTerminated() || debugTarget.isDisconnected()) {
emptyFolder();
@@ -504,7 +507,10 @@ public class MemoryViewPane extends AbstractMemoryViewPane {
{
// if debug element returns null from getAdapter, assume its debug target is going to retrieve memory blocks
memRetrieval = debugTarget;
- }
+ }
+
+ if (memRetrieval == null)
+ return;
if (fTabFolderForDebugView.containsKey(memRetrieval))
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
index 4b3720bb4..d5ca70514 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
@@ -57,6 +57,9 @@ public class MemoryViewUtil {
memRetrieval = debugTarget;
}
+ if (debugTarget == null)
+ return false;
+
// not valid if the debug target is already terminated
if (debugTarget.isTerminated() || debugTarget.isDisconnected())
return false;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
index 05feac476..95f9d2558 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
@@ -742,6 +742,9 @@ public class RenderingViewPane extends AbstractMemoryViewPane implements IMemory
private void handleDebugElementSelection(final IMemoryViewTab lastViewTab, final IDebugElement element)
{
+ if (element.getDebugTarget() == null)
+ return;
+
// don't do anything if the debug target is already terminated
if (element.getDebugTarget().isDisconnected() ||
element.getDebugTarget().isTerminated())

Back to the top