Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2011-07-14 19:12:48 +0000
committerPawel Piech2011-07-14 19:12:48 +0000
commita33ed9c4929968a5011e56f863b052cbc17b631d (patch)
treeb0099abe59aad8962af6d35eabdc6a9737e58734 /dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug
parent9f3bf0a326a7490723fd5fff305a91e628709b24 (diff)
downloadorg.eclipse.cdt-a33ed9c4929968a5011e56f863b052cbc17b631d.tar.gz
org.eclipse.cdt-a33ed9c4929968a5011e56f863b052cbc17b631d.tar.xz
org.eclipse.cdt-a33ed9c4929968a5011e56f863b052cbc17b631d.zip
Bug 351898 - Add guard to populate expression column for variables that
return error on evaluation.
Diffstat (limited to 'dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java
index fb4b5339867..de32bb34463 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java
@@ -731,7 +731,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
int count = 0;
for (final IPropertiesUpdate update : updates) {
- IExpression expression = (IExpression)DebugPlugin.getAdapter(update.getElement(), IExpression.class);
+ final IExpression expression = (IExpression)DebugPlugin.getAdapter(update.getElement(), IExpression.class);
if (expression != null) {
update.setProperty(AbstractExpressionVMNode.PROP_ELEMENT_EXPRESSION, expression.getExpressionText());
}
@@ -761,10 +761,13 @@ public class VariableVMNode extends AbstractExpressionVMNode
if (isSuccess()) {
fillExpressionDataProperties(update, getData());
} else {
- // In case of an error fill in the expression next in the name column.
+ // In case of an error fill in the expression text in the name column and expressions columns.
IExpressionDMContext dmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IExpressions.IExpressionDMContext.class);
if (dmc != null && dmc.getExpression() != null) {
update.setProperty(PROP_NAME, dmc.getExpression());
+ if (expression == null) {
+ update.setProperty(PROP_ELEMENT_EXPRESSION, dmc.getExpression());
+ }
}
update.setStatus(getStatus());
}

Back to the top