From a89a6117aa0ccffc18005a980a771a63d41460b0 Mon Sep 17 00:00:00 2001 From: Ted Williams Date: Wed, 5 Sep 2007 22:17:43 +0000 Subject: [PATCH] Bug 202342 --- .../variable/VariableLayoutNode.java | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLayoutNode.java index 1fbfe5e87bb..3805cf3ffcf 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLayoutNode.java @@ -77,6 +77,8 @@ public class VariableLayoutNode extends AbstractExpressionLayoutNode 0) + { + stringValueBuf.append(" "); + stringValueBuf.append(stringValue.length() > MAX_STRING_VALUE_LENGTH ? stringValue.substring(0, MAX_STRING_VALUE_LENGTH) : stringValue); + } + update.setLabel(stringValueBuf.toString(), labelIndex); // Color based on change history FormattedValueDMData oldData = (FormattedValueDMData) VMCacheManager.getVMCacheManager() .getCache(VariableLayoutNode.this.getVMProvider().getPresentationContext()) .getArchivedModelData(valueDmc); - if (oldData != null && !oldData.getFormattedValue().equals(getData().getFormattedValue())) { + + IExpressionDMData oldDMData = (IExpressionDMData) VMCacheManager.getVMCacheManager().getCache(update.getPresentationContext()).getArchivedModelData(dmc); + String oldStringValue = oldDMData == null ? null : oldDMData.getStringValue(); + + // highlight the value if either the value (address) has changed or the string (memory at the value) has changed + if ((oldData != null && !oldData.getFormattedValue().equals(getData().getFormattedValue())) + || (oldStringValue != null && !oldStringValue.equals(stringValue))) { update.setBackground( DebugUIPlugin.getPreferenceColor( IInternalDebugUIConstants.PREF_CHANGED_VALUE_BACKGROUND).getRGB(),