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

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

Issue 2453913002: Analyze requested files. (Closed)
Patch Set: Created 4 years, 2 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/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 1a3ae73c395e5e0f4fd03e0462d4acdcd1057219..b4143ac00619b43ca3dd9c65c9a8bdf5fa17797d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -228,7 +228,18 @@ class AnalysisDriver {
continue;
}
- // TODO(scheglov) analyze requested files
+ // Analyze a requested file.
+ if (_requestedFiles.isNotEmpty) {
+ String path = _requestedFiles.keys.first;
+ AnalysisResult result = _computeAnalysisResult(path, withUnit: true);
+ _requestedFiles.remove(path).forEach((completer) {
+ completer.complete(result);
+ });
+ yield result;
+ // Repeat the processing loop.
+ _hasWork.notify();
+ continue;
+ }
// Analyze a priority file.
if (_priorityFiles.isNotEmpty) {
« 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