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)