Example usage for org.eclipse.jdt.internal.compiler.lookup CompilationUnitScope problemReporter

List of usage examples for org.eclipse.jdt.internal.compiler.lookup CompilationUnitScope problemReporter

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup CompilationUnitScope problemReporter.

Prototype

@Override
    public ProblemReporter problemReporter() 

Source Link

Usage

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.lookup.OTClassScope.java

License:Open Source License

public void checkUnusedImports() {
    // cf. CompilationUnitDeclaration.checkUnusedImports()
    CompilationUnitScope scope = this.baseImportScope;
    if (scope != null && scope.imports != null) {
        for (int i = 0, max = scope.imports.length; i < max; i++) {
            ImportBinding importBinding = scope.imports[i];
            ImportReference importReference = importBinding.reference;
            if (importReference != null && ((importReference.bits & ASTNode.Used) == 0)) {
                scope.problemReporter().unusedImport(importReference);
            }//from   w w  w .  j a  v  a2 s .  c  o m
        }
    }
}