From b27e322c491ced08456d4b8374973a5714704649 Mon Sep 17 00:00:00 2001 From: Randy Rohrbach Date: Sat, 1 Nov 2008 04:45:32 +0000 Subject: [PATCH] Bugzilla 253047 --- .../viewmodel/expression/WatchExpressionCellModifier.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/internal/provisional/ui/viewmodel/expression/WatchExpressionCellModifier.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/internal/provisional/ui/viewmodel/expression/WatchExpressionCellModifier.java index 3c47d047e1e..4d0807bd65f 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/internal/provisional/ui/viewmodel/expression/WatchExpressionCellModifier.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/internal/provisional/ui/viewmodel/expression/WatchExpressionCellModifier.java @@ -49,23 +49,23 @@ public class WatchExpressionCellModifier implements ICellModifier { return ""; //$NON-NLS-1$ } - public void modify(Object element, String property, Object value) { if (!IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property)) return; if (!(value instanceof String)) return; - String strValue = ((String)value).trim(); + String origStrValue = (String) value; + String strValue = origStrValue.trim(); IWatchExpression expression = getWatchExpression(element); IExpressionManager expressionManager = DebugPlugin.getDefault().getExpressionManager(); if (expression != null) { if (strValue.length() != 0) { - expression.setExpressionText(strValue); + expression.setExpressionText(origStrValue); } else { // (bug 233111) If user entered a blank string, remove the expression. expressionManager.removeExpression(expression); } } else if (element instanceof NewExpressionVMC && strValue.length() != 0) { - IWatchExpression watchExpression = expressionManager.newWatchExpression(strValue); + IWatchExpression watchExpression = expressionManager.newWatchExpression(origStrValue); expressionManager.addExpression(watchExpression); } }