summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinnie Lai2012-01-10 16:56:03 (EST)
committer Pawel Piech2012-01-10 17:00:04 (EST)
commit6f4ad90bdd669f6e4a0b1313240a75c5294757b8 (patch)
treead48d2cdeca99d8e61c2bd06733953ea0d7bd11e
parent720f9a16ef8703e119f9f1f5bd84a8789b1e91d3 (diff)
downloadeclipse.platform.debug-6f4ad90bdd669f6e4a0b1313240a75c5294757b8.zip
eclipse.platform.debug-6f4ad90bdd669f6e4a0b1313240a75c5294757b8.tar.gz
eclipse.platform.debug-6f4ad90bdd669f6e4a0b1313240a75c5294757b8.tar.bz2
Bug 345974 - [expr] Changing an expression name in the expression view
should not accept an empty expression
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java
index 077d6ed..2001156 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.debug.internal.ui.elements.adapters;
+import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IWatchExpression;
import org.eclipse.debug.internal.ui.DefaultLabelProvider;
import org.eclipse.jface.viewers.ICellModifier;
@@ -55,7 +56,12 @@ public class WatchExpressionCellModifier implements ICellModifier {
// characters escaped properly
String expressionText = DefaultLabelProvider.encodeEsacpedChars((String)value);
IWatchExpression expression = (IWatchExpression) element;
- expression.setExpressionText(expressionText);
+ // Bug 345974 see ExpressionManagerContentProvider.AddNewExpressionElement.modify does not allow an empty string
+ if (expressionText.trim().length() > 0) {
+ expression.setExpressionText(expressionText);
+ } else {
+ DebugPlugin.getDefault().getExpressionManager().removeExpression(expression);
+ }
}
}
}