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

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

Introduction

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

Prototype

void acceptProblem(IProblem problem);

Source Link

Document

Notification of a Java problem.

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//from   w ww .  j  a va 2  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();
    }
}