/** * Loads the source from a file * * @param file The file */ public void loadSource(ControlFlowGraph graph) { instructionsLoc = new LinkedList<GAPPBaseInstruction>(); EmptyControlFlowVisitor visitor = new EmptyControlFlowVisitor() { @Override public void visit(AssignmentNode node) { instructionsLoc.addAll(node.getGAPP().getInstructions()); super.visit(node); } }; graph.accept(visitor); this.instructions = instructionsLoc.toArray(new GAPPBaseInstruction[0]); modelSrc.clear(); for (GAPPBaseInstruction instruction : instructionsLoc) { modelSrc.addElement(instruction.toString()); } ui.jListSrc.repaint(); }