Example usage for org.eclipse.jdt.internal.core.builder ReferenceCollection addDependencies

List of usage examples for org.eclipse.jdt.internal.core.builder ReferenceCollection addDependencies

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core.builder ReferenceCollection addDependencies.

Prototype

public void addDependencies(String[] typeNameDependencies) 

Source Link

Document

Add the given fully qualified names to this reference collection.

Usage

From source file:org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.java

License:Open Source License

protected void recordParticipantResult(CompilationParticipantResult result) {
    // any added/changed/deleted generated files have already been taken care
    // just record the problems and dependencies - do not expect there to be many
    // must be called after we're finished with the compilation unit results but before incremental loop adds affected files
    CategorizedProblem[] problems = result.problems;
    if (problems != null && problems.length > 0) {
        // existing problems have already been removed so just add these as new problems
        this.notifier.updateProblemCounts(problems);
        try {/*from   w  ww . j  a  v  a 2 s.  co m*/
            storeProblemsFor(result.sourceFile, problems);
        } catch (CoreException e) {
            // must continue with compile loop so just log the CoreException
            Util.log(e, "JavaBuilder logging CompilationParticipant's CoreException to help debugging"); //$NON-NLS-1$
        }
    }

    String[] dependencies = result.dependencies;
    if (dependencies != null) {
        ReferenceCollection refs = (ReferenceCollection) this.newState.references
                .get(result.sourceFile.typeLocator());
        if (refs != null)
            refs.addDependencies(dependencies);
    }
}