Added label editing to other opcodes (lookup,table,line)
@@ -196,12 +196,28 @@ public class OpcodeMouseListener implements ReleaseListener {
})));
break;
case AbstractInsnNode.TABLESWITCH_INSN:
- // TODO
TableSwitchInsnNode insnTableSwitch = (TableSwitchInsnNode) ain;
+ frame.add(new LabeledComponent("Default: ",
+ new LabelSwitcherPanel(list, method, insnTableSwitch.dflt, l -> insnTableSwitch.dflt = l)));
+ for (int i = 0; i < insnTableSwitch.labels.size(); i++) {
+ final int fi = i;
+ LabelNode label = insnTableSwitch.labels.get(i);
+ int j = insnTableSwitch.min + i;
+ frame.add(new LabeledComponent(j + ": ",
+ new LabelSwitcherPanel(list, method, label, l -> insnTableSwitch.labels.set(fi, l))));
+ }
break;
case AbstractInsnNode.LOOKUPSWITCH_INSN:
- // TODO
LookupSwitchInsnNode insnLookupSwitch = (LookupSwitchInsnNode) ain;
+ frame.add(new LabeledComponent("Default: ",
+ new LabelSwitcherPanel(list, method, insnLookupSwitch.dflt, l -> insnLookupSwitch.dflt = l)));
+ for (int i = 0; i < insnLookupSwitch.labels.size(); i++) {
+ final int fi = i;
+ LabelNode label = insnLookupSwitch.labels.get(i);
+ int j = insnLookupSwitch.keys.get(i);
+ frame.add(new LabeledComponent(j + ": ",
+ new LabelSwitcherPanel(list, method, label, l -> insnLookupSwitch.labels.set(fi, l))));
+ }
break;
case AbstractInsnNode.MULTIANEWARRAY_INSN:
MultiANewArrayInsnNode insnArray = (MultiANewArrayInsnNode) ain;
@@ -223,6 +239,8 @@ public class OpcodeMouseListener implements ReleaseListener {
insnLine.line = Integer.parseInt(s);
}
})));
+ frame.add(new LabeledComponent("Start: ",
+ new LabelSwitcherPanel(list, method, insnLine.start, l -> insnLine.start = l)));
break;
}
OpcodeTypeSwitchPanel opSelector = new OpcodeTypeSwitchPanel(list, ain);
