Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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);
     }
   }
 }
Exemplo n.º 3
0
 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);
 }