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

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

Issue 2478963002: Completion with the new analysis driver. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 1 month 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 | pkg/analysis_server/lib/src/domain_completion.dart » ('j') | 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 5c73edf239025614800aa9382c38f4fbcf233696..99a0f7d72a862f6f1c9c18bbcfce92b568d69420 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -585,7 +585,9 @@ class AnalysisServer {
}
/**
- * Return the analysis result for the file with the given [path].
+ * Return the analysis result for the file with the given [path]. The file is
+ * analyzed in one of the analysis drivers to which the file was added,
+ * otherwise in the first driver, otherwise `null` is returned.
*/
Future<nd.AnalysisResult> getAnalysisResult(String path) async {
nd.AnalysisResult result = priorityFileResults[path];
@@ -593,7 +595,7 @@ class AnalysisServer {
return result;
}
nd.AnalysisDriver driver = getAnalysisDriver(path);
- return driver.getResult(path);
+ return driver?.getResult(path);
}
CompilationUnitElement getCompilationUnitElement(String file) {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/domain_completion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698