Java 类org.eclipse.jdt.core.compiler.ReconcileContext 实例源码

项目:eclipse-filecompletion    文件:MarkerFinderImpl.java   
@Override
public void reconcile(final ReconcileContext context) {
    if (FileCompletionPreferencePage.checkDuringTyping) {
        if (context == null) {
            LOG.fine("context is null");
        } else {
            IJavaElementDelta delta = context.getDelta();
            if (delta == null) {
                LOG.fine("delta is null");
            } else {
                reconcileImpl(context, delta);
            }
        }
    }

}
项目:Eclipse-Postfix-Code-Completion    文件:ReconcileWorkingCopyOperation.java   
private void notifyParticipants(final CompilationUnit workingCopy) {
    IJavaProject javaProject = getWorkingCopy().getJavaProject();
    CompilationParticipant[] participants = JavaModelManager.getJavaModelManager().compilationParticipants.getCompilationParticipants(javaProject);
    if (participants == null) return;

    final ReconcileContext context = new ReconcileContext(this, workingCopy);
    for (int i = 0, length = participants.length; i < length; i++) {
        final CompilationParticipant participant = participants[i];
        SafeRunner.run(new ISafeRunnable() {
            public void handleException(Throwable exception) {
                if (exception instanceof Error) {
                    throw (Error) exception; // errors are not supposed to be caught
                } else if (exception instanceof OperationCanceledException)
                    throw (OperationCanceledException) exception;
                else if (exception instanceof UnsupportedOperationException) {
                    // might want to disable participant as it tried to modify the buffer of the working copy being reconciled
                    Util.log(exception, "Reconcile participant attempted to modify the buffer of the working copy being reconciled"); //$NON-NLS-1$
                } else
                    Util.log(exception, "Exception occurred in reconcile participant"); //$NON-NLS-1$
            }
            public void run() throws Exception {
                participant.reconcile(context);
            }
        });
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ReconcileWorkingCopyOperation.java   
private void notifyParticipants(final CompilationUnit workingCopy) {
    IJavaProject javaProject = getWorkingCopy().getJavaProject();
    CompilationParticipant[] participants = JavaModelManager.getJavaModelManager().compilationParticipants.getCompilationParticipants(javaProject);
    if (participants == null) return;

    final ReconcileContext context = new ReconcileContext(this, workingCopy);
    for (int i = 0, length = participants.length; i < length; i++) {
        final CompilationParticipant participant = participants[i];
        SafeRunner.run(new ISafeRunnable() {
            public void handleException(Throwable exception) {
                if (exception instanceof Error) {
                    throw (Error) exception; // errors are not supposed to be caught
                } else if (exception instanceof OperationCanceledException)
                    throw (OperationCanceledException) exception;
                else if (exception instanceof UnsupportedOperationException) {
                    // might want to disable participant as it tried to modify the buffer of the working copy being reconciled
                    Util.log(exception, "Reconcile participant attempted to modify the buffer of the working copy being reconciled"); //$NON-NLS-1$
                } else
                    Util.log(exception, "Exception occurred in reconcile participant"); //$NON-NLS-1$
            }
            public void run() throws Exception {
                participant.reconcile(context);
            }
        });
    }
}
项目:txtUML    文件:JtxtUMLCompilationParticipant.java   
@Override
public void reconcile(ReconcileContext context) {
    try {
        CompilationUnit unit = context.getAST8();
        ProblemCollector collector = new ProblemCollector(context);
        if (ElementTypeTeller.isModelElement(unit)) {
            unit.accept(new ModelVisitor(collector));
        }
        collector.refreshProblems();
    } catch (Exception e) {
        Logger.sys.error("Error while checking for problems", e); //$NON-NLS-1$
    }
}
项目:paninij    文件:Plugin.java   
@Override
public void reconcile(ReconcileContext context) {
    log("reconcile");
}
项目:txtUML    文件:ProblemCollector.java   
public ProblemCollector(ReconcileContext context) throws JavaModelException {
    resource = context.getWorkingCopy().getResource();
    this.sourceInfo = new SourceInfo(context.getAST8());
}