Example usage for org.eclipse.jdt.core IProblemRequestor beginReporting

List of usage examples for org.eclipse.jdt.core IProblemRequestor beginReporting

Introduction

In this page you can find the example usage for org.eclipse.jdt.core IProblemRequestor beginReporting.

Prototype

void beginReporting();

Source Link

Document

Notification sent before starting the problem detection process.

Usage

From source file:org.eclipse.ajdt.core.reconcile.AJReconcileWorkingCopyOperation.java

License:Open Source License

/**
* Report working copy problems to a given requestor.
*
* @param workingCopy// ww w  . j  a  v  a2  s.c  o  m
* @param problemRequestor
*/
private void reportProblems(CompilationUnit workingCopy, IProblemRequestor problemRequestor) {
    try {
        problemRequestor.beginReporting();
        for (Iterator iteraror = this.problems.values().iterator(); iteraror.hasNext();) {
            CategorizedProblem[] categorizedProblems = (CategorizedProblem[]) iteraror.next();
            if (categorizedProblems == null)
                continue;
            for (int i = 0, length = categorizedProblems.length; i < length; i++) {
                CategorizedProblem problem = categorizedProblems[i];
                if (JavaModelManager.VERBOSE) {
                    AJLog.log(AJLog.PARSER, "PROBLEM FOUND while reconciling : " + //$NON-NLS-1$
                            problem.getMessage());
                }
                if (this.progressMonitor != null && this.progressMonitor.isCanceled())
                    break;
                problemRequestor.acceptProblem(problem);
            }
        }
    } finally {
        problemRequestor.endReporting();
    }
}