Java 类org.eclipse.xtext.ui.editor.reconciler.XtextReconciler 实例源码

项目:dsl-devkit    文件:AbstractXtextEditorTest.java   
/** {@inheritDoc} */
@Override
protected void waitForValidation() {
  // Editor tests frequently work by modifying the document. We first need to wait for the reconciler to run, otherwise we may
  // actually get results from before a document change is reflected in the document's resource, leading to spurious errors.
  // Note that the XtextReconciler runs with a delay of 500ms.
  waitForJobsOfFamily(XtextReconciler.class.getName());
  super.waitForValidation();
}
项目:CooperateModelingEnvironment    文件:CooperateCDOXtextEditor.java   
private void waitForReconcileToStartAndFinish() {
    Optional<XtextReconciler> foundReconciler = Optional.ofNullable(getInternalSourceViewer())
            .filter(IAdaptable.class::isInstance).map(IAdaptable.class::cast)
            .map(a -> a.getAdapter(IReconciler.class)).filter(XtextReconciler.class::isInstance)
            .map(XtextReconciler.class::cast);
    if (!foundReconciler.isPresent()) {
        return;
    }

    JobStartListener listener = new JobStartListener();
    XtextReconciler reconciler = foundReconciler.get();
    try {
        reconciler.join();
        reconciler.addJobChangeListener(listener);
        reconciler.forceReconcile();
        synchronized (listener) {
            while (!listener.isStarted()) {
                listener.wait();
            }
        }
        reconciler.join();
    } catch (InterruptedException e) {
        return;
    } finally {
        reconciler.removeJobChangeListener(listener);
    }
}
项目:sadlos2    文件:SadlUiModule.java   
public SadlUiModule(AbstractUIPlugin plugin) {
    super(plugin);
    IOConsoleOutputStream iocos = SadlConsole
            .getOutputStream(MessageType.INFO);
    System.setOut(new PrintStream(iocos));
    System.setErr(new PrintStream(SadlConsole
            .getOutputStream(MessageType.ERROR)));

    // this is to prevent XtextReconcilerDebuger from continually reporting
    // errors when debug level isn't initialized
    Logger log = Logger.getLogger(XtextReconciler.class);
    log.setLevel(Level.WARN);
}
项目:sadlos2    文件:JenaUiModule.java   
public JenaUiModule(AbstractUIPlugin plugin) {
        super(plugin);
        IOConsoleOutputStream iocos = SadlConsole.getOutputStream(MessageType.INFO);
        System.setOut(new PrintStream(iocos));
        System.setErr(new PrintStream(SadlConsole.getOutputStream(MessageType.ERROR)));

//      this is to prevent XtextReconcilerDebuger from continually reporting errors when debug level isn't initialized
        Logger log = Logger.getLogger(XtextReconciler.class);
        log.setLevel(Level.WARN);
    }
项目:n4js    文件:N4JSUiModule.java   
/** Custom XtextReconciler. */
public Class<? extends XtextReconciler> bindXtextReconciler() {
    return N4JSReconciler.class;
}
项目:bts    文件:DefaultUiModule.java   
public Class<? extends IReconciler> bindIReconciler() {
    return XtextReconciler.class;
}