Index: pkg/analysis_server/lib/src/domain_analysis.dart |
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart |
index 431155ada5e23db6eb0303927603ea319914d394..499fd9955970437209426febd9f342df00d611b9 100644 |
--- a/pkg/analysis_server/lib/src/domain_analysis.dart |
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart |
@@ -95,7 +95,7 @@ class AnalysisDomainHandler implements RequestHandler { |
AnalysisResult result = await server.getAnalysisResult(params.file); |
unit = result?.unit; |
} else { |
- unit = server.getResolvedCompilationUnit(params.file); |
+ unit = await server.getResolvedCompilationUnit(params.file); |
} |
// Prepare the hovers. |
@@ -144,10 +144,10 @@ class AnalysisDomainHandler implements RequestHandler { |
if (analysisFuture == null) { |
return new Response.getNavigationInvalidFile(request); |
} |
- analysisFuture.then((AnalysisDoneReason reason) { |
+ analysisFuture.then((AnalysisDoneReason reason) async { |
switch (reason) { |
case AnalysisDoneReason.COMPLETE: |
- CompilationUnit unit = server.getResolvedCompilationUnit(file); |
+ CompilationUnit unit = await server.getResolvedCompilationUnit(file); |
if (unit == null) { |
server.sendResponse(new Response.getNavigationInvalidFile(request)); |
} else { |