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

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

Issue 2720023002: Ask Dart analysis results only for Dart files. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 0bfbe702a5eb7e1a662c87da5a5cc92dbb38226e..1ed2a48fca111be7c718359104a7b29debff7077 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -1253,18 +1253,14 @@ class AnalysisServer {
}
if (options.enableNewAnalysisDriver) {
this.analysisServices = subscriptions;
- Iterable<nd.AnalysisDriver> drivers = driverMap.values;
- if (drivers.isNotEmpty) {
- Set<String> allNewFiles =
- subscriptions.values.expand((files) => files).toSet();
- for (String file in allNewFiles) {
- nd.AnalysisDriver driver = drivers.firstWhere(
- (driver) => driver.addedFiles.contains(file),
- orElse: () => drivers.first);
- // The result will be produced by the "results" stream with
- // the fully resolved unit, and processed with sending analysis
- // notifications as it happens after content changes.
- driver.getResult(file).catchError((exception, stackTrace) {});
+ Set<String> allNewFiles =
+ subscriptions.values.expand((files) => files).toSet();
+ for (String file in allNewFiles) {
+ // The result will be produced by the "results" stream with
+ // the fully resolved unit, and processed with sending analysis
+ // notifications as it happens after content changes.
+ if (AnalysisEngine.isDartFileName(file)) {
+ getAnalysisResult(file);
}
}
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698