notice.setCompilationUnit(unit);
notice.setErrors(dartCopy.getAllErrors(), lineInfo);
}
}
} else {
@SuppressWarnings("resource")
PrintStringWriter writer = new PrintStringWriter();
writer.println("Library resolution results discarded for");
for (ResolvableLibrary library : resolvedLibraries) {
for (Source source : library.getCompilationUnitSources()) {
DartEntry dartEntry = getReadableDartEntry(source);
if (dartEntry != null) {
long resultTime = library.getModificationTime(source);
writer.println(" " + debuggingString(source) + "; sourceTime = "
+ getModificationStamp(source) + ", resultTime = " + resultTime
+ ", cacheTime = " + dartEntry.getModificationTime());
DartEntryImpl dartCopy = dartEntry.getWritableCopy();
if (thrownException == null || resultTime >= 0L) {
//
// The analysis was performed on out-of-date sources. Mark the cache so that the
// sources will be re-analyzed using the up-to-date sources.
//
dartCopy.recordResolutionNotInProcess();
} else {
//
// We could not determine whether the sources were up-to-date or out-of-date. Mark
// the cache so that we won't attempt to re-analyze the sources until there's a
// good chance that we'll be able to do so without error.
//
dartCopy.recordResolutionError(thrownException);
cache.remove(source);
}
cache.put(source, dartCopy);
if (source.equals(unitSource)) {
unitEntry = dartCopy;
}
} else {
writer.println(" " + debuggingString(source) + "; sourceTime = "
+ getModificationStamp(source) + ", no entry");
}
}
}
logInformation(writer.toString());
}
}
}
if (thrownException != null) {
throw thrownException;