Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantha Chan2010-04-23 12:16:12 -0400
committerSamantha Chan2010-04-23 12:16:12 -0400
commit41e8383a3ab7bb7d85c9a4e102162be9bce596e8 (patch)
tree20ef87e76ff8d2a0988e1533171822589f981dbd
parent4449a8370b731e8a2b8c2c6bebd8296138557546 (diff)
downloadeclipse.platform.debug-41e8383a3ab7bb7d85c9a4e102162be9bce596e8.tar.gz
eclipse.platform.debug-41e8383a3ab7bb7d85c9a4e102162be9bce596e8.tar.xz
eclipse.platform.debug-41e8383a3ab7bb7d85c9a4e102162be9bce596e8.zip
Bug 300036 - [Memory View] NPE in AbstractAsyncTableRendering#getSelectedAddress on rendering creation
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
index ce99c1194..781c36376 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Teodor Madan (Freescale) - Bug 292360 - [Memory View] platform renderings do not implement correctly IMemoryRendering#getControl
* Teodor Madan (Freescale) - Bug 292426 - [Memory View] platform renderings cannot be repositioned from non-UI thread through calls to IRepositionableMemoryRendering#goToAddress
+ * Teodor Madan (Freescale) & Jeremiah Swan (IBM) - Bug 300036 - [Memory View] NPE in AbstractAsyncTableRendering#getSelectedAddress on rendering creation
*******************************************************************************/
package org.eclipse.debug.internal.ui.memory.provisional;
@@ -551,6 +552,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
* @see org.eclipse.debug.ui.memory.IResettableMemoryRendering#resetRendering()
*/
public void resetRendering() throws DebugException {
+ if (!fIsCreated)
+ return;
+
BigInteger baseAddress = fContentDescriptor.getContentBaseAddress();
fTableViewer.setSelection(baseAddress);
@@ -2059,6 +2063,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
* @return the currently selected address in this rendering
*/
public BigInteger getSelectedAddress() {
+ if (!fIsCreated)
+ return null;
+
Object key = fTableViewer.getSelectionKey();
if (key != null && key instanceof BigInteger)
@@ -2206,6 +2213,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
* Update labels in the memory rendering.
*/
public void refresh() {
+ if (!fIsCreated)
+ return;
+
fTableViewer.refresh();
}
@@ -2214,6 +2224,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
* Resize column to the preferred size.
*/
public void resizeColumnsToPreferredSize() {
+ if (!fIsCreated)
+ return;
+
fTableViewer.resizeColumnsToPreferredSize();
if (!fIsShowAddressColumn)
{
@@ -2235,6 +2248,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
*/
public void updateLabels()
{
+ if (!fIsCreated)
+ return;
+
UIJob job = new UIJob("updateLabels"){ //$NON-NLS-1$
public IStatus runInUIThread(IProgressMonitor monitor) {

Back to the top