}
private TypeOracle createTypeOracle(Set<Resource> resources) throws UnableToCompleteException {
List<CompilationUnitBuilder> builders = new ArrayList<CompilationUnitBuilder>();
for (Resource resource : resources) {
CompilationUnitBuilder builder = CompilationUnitBuilder.create(resource);
builders.add(builder);
}
List<CompilationUnit> units = JdtCompiler.compile(logger, compilerContext, builders);
boolean anyError = false;
TreeLogger branch = logger.branch(TreeLogger.TRACE, "Checking for compile errors");