Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1494)

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2566003002: When a file is removed from the driver, reschedule full analysis. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index ecb8b6750ef275fe40cfdac21dab185d14876168..70ba1ee4640368cd714a1382261f6e34ded1d91c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -661,6 +661,17 @@ class FileSystemState {
..insert(0, canonicalFile);
}
+ /**
+ * Remove the file with the given [path].
+ */
+ void removeFile(String path) {
+ _uriToFile.clear();
+ knownFilePaths.clear();
+ _pathToFiles.clear();
+ _pathToCanonicalFile.clear();
+ _partToLibraries.clear();
+ }
+
void _addFileWithPath(String path, FileState file) {
var files = _pathToFiles[path];
if (files == null) {
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698