LabelRow lr = (LabelRow)er;
sd.drawIndent();
sd.drawIndent();
sd.drawDefault(lr.getLabel().getId() + ":");
} else if (er instanceof CodeRow) {
CodeRow cr = (CodeRow)er;
// execution row
if (cr.isExecutionRow()) {
sd.setExecutionBackground();
}
// breakpoint
if (cr.getBreakpoint() != null) {
sd.drawBreakpoint();
}
// line identifier
LineIdentifierMode mode = EditorFacade.getInstance().getLineIdentifierMode();
switch (mode.getMode()) {
case LineIdentifierMode.MODE_OFF:
break;
case LineIdentifierMode.MODE_PC:
sd.drawSmall(String.valueOf(cr.getPosition()), 15);
break;
case LineIdentifierMode.MODE_SOURCELINE:
if (cr.hasLineNumber()) {
sd.drawSmall(String.valueOf(cr.getLineNumber()), 0);
}
break;
}
sd.setOffset(0);
Instruction inst = cr.getInstruction();
DecompilationContext dc = cr.getDecompilationContext();
LocalVariableTableAttribute lvs = dc.getLocalVariableTable();
ConstantPool pool = dc.getConstantPool();
sd.drawIndent();
sd.drawIndent();
sd.drawInstruction(inst.getMnemonic());
Parameters params = inst.getParameters();
for (int i = 0; i < params.getCount(); i++) {
try {
switch (params.getType(i)) {
case TYPE_LOCAL_VARIABLE:
case TYPE_LOCAL_VARIABLE_WIDE:
case TYPE_LOCAL_VARIABLE_READONLY:
if (lvs == null) {
sd.drawDefault(" " + params.getInt(i));
} else {
LocalVariable lv = lvs.getLocalVariable(params.getInt(i), cr.getPosition());
if (lv == null) {
sd.drawDefault(" " + params.getInt(i));
} else {
sd.drawDefault(" " + lv.getName());
}