diff options
author | Eugene Tarassov | 2012-10-01 20:48:33 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-10-02 15:23:58 +0000 |
commit | 418c1c2a5f447700048229a2a85bf05ee7c9eb17 (patch) | |
tree | b6de37cff992944f9ed0e62a533bccf14cfc032f /plugins | |
parent | 3a5a65d41bb654afda1f4ae3224c79317c0258b2 (diff) | |
download | org.eclipse.tcf-418c1c2a5f447700048229a2a85bf05ee7c9eb17.tar.gz org.eclipse.tcf-418c1c2a5f447700048229a2a85bf05ee7c9eb17.tar.xz org.eclipse.tcf-418c1c2a5f447700048229a2a85bf05ee7c9eb17.zip |
TCF Debugger: enable editing of Value column cells in the Variables view
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java index 01057f915..b54d9632f 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java @@ -1668,6 +1668,9 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT if (TCFColumnPresentationExpression.COL_DEC_VALUE.equals(column_id)) { return new TextCellEditor(parent); } + if (TCFColumnPresentationExpression.COL_VALUE.equals(column_id)) { + return new TextCellEditor(parent); + } return null; } @@ -1695,6 +1698,13 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT done(TCFNumberFormat.isValidDecNumber(true, node.toNumberString(10)) == null); return; } + if (TCFColumnPresentationExpression.COL_VALUE.equals(property)) { + StyledStringBuffer bf = node.getPrettyExpression(this); + if (bf == null) return; + String s = bf.toString(); + done(s.startsWith("0x") || TCFNumberFormat.isValidDecNumber(true, s) == null); + return; + } } } done(Boolean.FALSE); @@ -1724,6 +1734,12 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT done(node.toNumberString(10)); return; } + if (TCFColumnPresentationExpression.COL_VALUE.equals(property)) { + StyledStringBuffer bf = node.getPrettyExpression(this); + if (bf == null) return; + done(bf.toString()); + return; + } } done(null); } @@ -1804,6 +1820,17 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT error = TCFNumberFormat.isValidDecNumber(is_float, input); if (error == null) bf = TCFNumberFormat.toByteArray(input, 10, is_float, size, signed, big_endian); } + else if (TCFColumnPresentationExpression.COL_VALUE.equals(property)) { + if (input.startsWith("0x")) { + String s = input.substring(2); + error = TCFNumberFormat.isValidHexNumber(s); + if (error == null) bf = TCFNumberFormat.toByteArray(s, 16, false, size, signed, big_endian); + } + else { + error = TCFNumberFormat.isValidDecNumber(is_float, input); + if (error == null) bf = TCFNumberFormat.toByteArray(input, 10, is_float, size, signed, big_endian); + } + } if (error != null) throw new Exception("Invalid value: " + value, new Exception(error)); if (bf != null) { IExpressions exps = node.launch.getService(IExpressions.class); |