mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 572880: Display an ellipsis if opcode is wider than column
Instead of silently having opcode bytes not display, show an ellipsis in the last column of the opcodes if the length required for that line is too long. Change-Id: If1379846c2dd7111324933c2bd72244f6abade02
This commit is contained in:
parent
17cabff257
commit
2443cfbeff
1 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,11 @@ public class OpcodeRulerColumn extends DisassemblyRulerColumn {
|
|||
if (pos instanceof DisassemblyPosition && pos.length > 0 && pos.offset == offset && pos.fValid) {
|
||||
DisassemblyPosition disassPos = (DisassemblyPosition) pos;
|
||||
if (disassPos.fRawOpcode != null) {
|
||||
return disassPos.fRawOpcode;
|
||||
if (disassPos.fRawOpcode.length() > nChars) {
|
||||
return disassPos.fRawOpcode.substring(0, nChars - 1) + "…"; //$NON-NLS-1$
|
||||
} else {
|
||||
return disassPos.fRawOpcode;
|
||||
}
|
||||
}
|
||||
} else if (pos != null && !pos.fValid) {
|
||||
return DOTS.substring(0, nChars);
|
||||
|
|
Loading…
Add table
Reference in a new issue