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

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

Introduction

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

Prototype

void endReporting();

Source Link

Document

Notification sent after having completed 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/*w  ww.j a  v a  2s . 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();
    }
}