/** * Run a single paragraph. * * @param paragraphId */ public void run(String paragraphId) { Paragraph p = getParagraph(paragraphId); p.setNoteReplLoader(replLoader); p.setListener(jobListenerFactory.getParagraphJobListener(this)); Interpreter intp = replLoader.get(p.getRequiredReplName()); if (intp == null) { throw new InterpreterException("Interpreter " + p.getRequiredReplName() + " not found"); } intp.getScheduler().submit(p); }
/** * Run all paragraphs sequentially. * * @param jobListener */ public void runAll() { synchronized (paragraphs) { for (Paragraph p : paragraphs) { p.setNoteReplLoader(replLoader); p.setListener(jobListenerFactory.getParagraphJobListener(this)); Interpreter intp = replLoader.get(p.getRequiredReplName()); intp.getScheduler().submit(p); } } }
public List<String> completion(String paragraphId, String buffer, int cursor) { Paragraph p = getParagraph(paragraphId); p.setNoteReplLoader(replLoader); p.setListener(jobListenerFactory.getParagraphJobListener(this)); return p.completion(buffer, cursor); }