|| (isPriority && elementState == CacheState.FLUSHED)) {
//return createResolveDartLibraryTask(librarySource, (DartEntry) libraryEntry);
DartEntryImpl libraryCopy = libraryEntry.getWritableCopy();
libraryCopy.setState(DartEntry.ELEMENT, CacheState.IN_PROCESS);
cache.put(librarySource, libraryCopy);
return new TaskData(new ResolveDartLibraryTask(this, source, librarySource), false);
}
CacheState resolvedUnitState = dartEntry.getStateInLibrary(
DartEntry.RESOLVED_UNIT,
librarySource);
if (resolvedUnitState == CacheState.INVALID
|| (isPriority && resolvedUnitState == CacheState.FLUSHED)) {
//
// The commented out lines below are an optimization that doesn't quite work yet. The
// problem is that if the source was not resolved because it wasn't part of any library,
// then there won't be any elements in the element model that we can use to resolve it.
//
//LibraryElement libraryElement = libraryEntry.getValue(DartEntry.ELEMENT);
//if (libraryElement != null) {
// return new ResolveDartUnitTask(this, source, libraryElement);
//}
// Possibly replace with: return createResolveDartLibraryTask(librarySource, (DartEntry) libraryEntry);
DartEntryImpl dartCopy = dartEntry.getWritableCopy();
dartCopy.setStateInLibrary(
DartEntry.RESOLVED_UNIT,
librarySource,
CacheState.IN_PROCESS);
cache.put(source, dartCopy);
return new TaskData(new ResolveDartLibraryTask(this, source, librarySource), false);
}
if (generateSdkErrors || !source.isInSystemLibrary()) {
CacheState verificationErrorsState = dartEntry.getStateInLibrary(
DartEntry.VERIFICATION_ERRORS,
librarySource);