Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2004-12-08 23:03:20 -0500
committerMikhail Khodjaiants2004-12-08 23:03:20 -0500
commitdbf20bee131483d6c7b50729230b45021c188f7a (patch)
treeca4f63d2775ec6a643f7d35c02f99f088b6bd975
parent75a162a9df1a2aad0bcabd37008afd11afa9412e (diff)
downloadorg.eclipse.cdt-dbf20bee131483d6c7b50729230b45021c188f7a.tar.gz
org.eclipse.cdt-dbf20bee131483d6c7b50729230b45021c188f7a.tar.xz
org.eclipse.cdt-dbf20bee131483d6c7b50729230b45021c188f7a.zip
Fix for bug 79678: NPE in Expression.
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java7
2 files changed, 9 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index e7959df7051..646d36764bb 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-08 Mikhail Khodjaiants
+ Fix for bug 79678: NPE in Expression.
+ * CExpression.java
+
2004-12-01 Mikhail Khodjaiants
New fix for bug 80034: Expressions view does not display correct no. of elements in array.
* CValueFactory.java
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java
index 8677dd02840..3fee999c90d 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CExpression.java
@@ -33,6 +33,8 @@ import org.eclipse.debug.core.model.IValue;
*/
public class CExpression extends CVariable implements IExpression {
+ private String fText;
+
private ICDIExpression fCDIExpression;
private CStackFrame fStackFrame;
@@ -46,7 +48,8 @@ public class CExpression extends CVariable implements IExpression {
*/
public CExpression( CStackFrame frame, ICDIExpression cdiExpression, ICDIVariableDescriptor varObject ) {
super( frame, varObject );
- setFormat( CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ))) ;
+ setFormat( CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) );
+ fText = cdiExpression.getExpressionText();
fCDIExpression = cdiExpression;
fStackFrame = frame;
}
@@ -55,7 +58,7 @@ public class CExpression extends CVariable implements IExpression {
* @see org.eclipse.debug.core.model.IExpression#getExpressionText()
*/
public String getExpressionText() {
- return fCDIExpression.getExpressionText();
+ return fText;
}
/* (non-Javadoc)

Back to the top