SystemFacade.getInstance().performAction(group);
}
}
private void insertInstruction(MethodDefRow mdr, int pc, LocalVariableTableAttribute lvAttr, Code code) {
InstructionEditor editor = new InstructionEditor();
editor.setClassFile(this.cf);
editor.setPC(pc);
editor.setLocalVariableTable(lvAttr);
editor.invokeInsert();
if (!editor.wasCancelled()) {
GroupAction group = new GroupAction();
if (code == null) {
group.add(new CreateCodeAttributeAction(mdr.getMethod().getAttributes(), this.cf.getPool()));
}
List choosers = editor.getChoosers();
Instruction instruction = editor.getInstruction();
try {
instruction = instruction.createNewInstance();
} catch(Exception e) {
SystemFacade.getInstance().handleException(e);
}