diff options
author | Eugene Tarassov | 2013-03-12 17:48:13 +0000 |
---|---|---|
committer | Eugene Tarassov | 2013-03-12 17:48:13 +0000 |
commit | 23244a7613bb4349c27f23e04174a95dbb18ac0b (patch) | |
tree | 7378ad948ed090e78c52c88b079e346a42c73cfc /plugins/org.eclipse.tcf.debug.ui | |
parent | 2b1e62424f22b3234cb315b9709a3d0b51efdaa3 (diff) | |
download | org.eclipse.tcf-23244a7613bb4349c27f23e04174a95dbb18ac0b.tar.gz org.eclipse.tcf-23244a7613bb4349c27f23e04174a95dbb18ac0b.tar.xz org.eclipse.tcf-23244a7613bb4349c27f23e04174a95dbb18ac0b.zip |
TCF Debugger: changed order of info in the details pane of the Registers view - easier to see reg value when the pane size is small
Diffstat (limited to 'plugins/org.eclipse.tcf.debug.ui')
-rw-r--r-- | plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java | 88 |
1 files changed, 50 insertions, 38 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java index 2996ad09b..a76f4c613 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java @@ -241,45 +241,21 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchIn public boolean getDetailText(StyledStringBuffer bf, Runnable done) { if (!context.validate(done)) return false; if (!value.validate(done)) return false; - int pos = bf.length(); - bf.append(context.getError(), ColorCache.rgb_error); - if (bf.length() == pos) bf.append(value.getError(), ColorCache.rgb_error); - if (bf.length() == pos) { - IRegisters.RegistersContext ctx = context.getData(); - if (ctx != null) { - if (ctx.getDescription() != null) { - bf.append(ctx.getDescription()); - bf.append('\n'); - } - int l = bf.length(); - Number addr = ctx.getMemoryAddress(); - if (addr != null) { - bf.append("Address: ", SWT.BOLD); - bf.append("0x", StyledStringBuffer.MONOSPACED); - bf.append(JSON.toBigInteger(addr).toString(16), StyledStringBuffer.MONOSPACED); - } - if (ctx.isReadable()) { - if (l < bf.length()) bf.append(", "); - bf.append("readable"); - } - if (ctx.isReadOnce()) { - if (l < bf.length()) bf.append(", "); - bf.append("read once"); - } - if (ctx.isWriteable()) { - if (l < bf.length()) bf.append(", "); - bf.append("writable"); - } - if (ctx.isWriteOnce()) { - if (l < bf.length()) bf.append(", "); - bf.append("write once"); - } - if (ctx.hasSideEffects()) { - if (l < bf.length()) bf.append(", "); - bf.append("side effects"); - } - if (l < bf.length()) bf.append('\n'); + if (context.getError() != null) { + bf.append(context.getError(), ColorCache.rgb_error); + return true; + } + IRegisters.RegistersContext ctx = context.getData(); + if (ctx != null) { + if (ctx.getDescription() != null) { + bf.append(ctx.getDescription()); + bf.append('\n'); } + } + if (value.getError() != null) { + bf.append(value.getError(), ColorCache.rgb_error); + } + else { byte[] v = value.getData(); if (v != null) { bf.append("Hex: ", SWT.BOLD); @@ -296,6 +272,42 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchIn bf.append('\n'); } } + if (ctx != null) { + int l = bf.length(); + BigInteger addr = JSON.toBigInteger(ctx.getMemoryAddress()); + if (addr != null) { + bf.append("Address: ", SWT.BOLD); + bf.append("0x", StyledStringBuffer.MONOSPACED); + bf.append(addr.toString(16), StyledStringBuffer.MONOSPACED); + } + BigInteger size = JSON.toBigInteger(ctx.getSize()); + if (size != null && size.compareTo(BigInteger.ZERO) > 0) { + if (l < bf.length()) bf.append(", "); + bf.append("Size: ", SWT.BOLD); + bf.append(size.toString(10), StyledStringBuffer.MONOSPACED); + } + if (ctx.isReadable()) { + if (l < bf.length()) bf.append(", "); + bf.append("readable"); + } + if (ctx.isReadOnce()) { + if (l < bf.length()) bf.append(", "); + bf.append("read once"); + } + if (ctx.isWriteable()) { + if (l < bf.length()) bf.append(", "); + bf.append("writable"); + } + if (ctx.isWriteOnce()) { + if (l < bf.length()) bf.append(", "); + bf.append("write once"); + } + if (ctx.hasSideEffects()) { + if (l < bf.length()) bf.append(", "); + bf.append("side effects"); + } + if (l < bf.length()) bf.append('\n'); + } return true; } |