// logInformation("Added Dart sources, invalidating all resolution information");
ArrayList<Source> sourcesToInvalidate = new ArrayList<Source>();
MapIterator<Source, SourceEntry> iterator = cache.iterator();
while (iterator.moveNext()) {
Source source = iterator.getKey();
SourceEntry sourceEntry = iterator.getValue();
if (!source.isInSystemLibrary()
&& (sourceEntry instanceof DartEntry || sourceEntry instanceof HtmlEntry)) {
sourcesToInvalidate.add(source);
}
}
int count = sourcesToInvalidate.size();
for (int i = 0; i < count; i++) {
Source source = sourcesToInvalidate.get(i);
SourceEntry entry = getReadableSourceEntry(source);
if (entry instanceof DartEntry) {
DartEntry dartEntry = (DartEntry) entry;
DartEntryImpl dartCopy = dartEntry.getWritableCopy();
dartCopy.invalidateAllResolutionInformation(false);
cache.put(source, dartCopy);