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

Unified Diff: pkg/analysis_server/lib/src/operation/operation_analysis.dart

Issue 2612723002: Implement 'analysis.analyzedFiles' notification with the new analysis driver. (Closed)
Patch Set: Created 3 years, 11 months 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/analysis_server/lib/src/operation/operation_analysis.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index c95f09a6794e1fdbf631289d69970846b03bb378..7db23366017cdb4ec65b82f5e40ef85e1827d044 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -139,9 +139,17 @@ void sendAnalysisNotificationAnalyzedFiles(AnalysisServer server) {
// of analyzed files each time analysis is complete, consider modifying the
// analysis engine to update this set incrementally as analysis is
// performed.
- LibraryDependencyCollector collector =
- new LibraryDependencyCollector(server.analysisContexts.toList());
- Set<String> analyzedFiles = collector.collectLibraryDependencies();
+ Set<String> analyzedFiles;
+ if (server.options.enableNewAnalysisDriver) {
+ analyzedFiles = server.driverMap.values
+ .map((driver) => driver.knownFiles)
+ .expand((files) => files)
+ .toSet();
+ } else {
+ LibraryDependencyCollector collector =
+ new LibraryDependencyCollector(server.analysisContexts.toList());
+ analyzedFiles = collector.collectLibraryDependencies();
+ }
Set<String> prevAnalyzedFiles = server.prevAnalyzedFiles;
if (prevAnalyzedFiles != null &&
prevAnalyzedFiles.length == analyzedFiles.length &&

Powered by Google App Engine
This is Rietveld 408576698