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 4021eb05e2a3afcbce7d61699b89790d355e2f2c..6b25161b7ef571d1e5467a6df1efa6587057e12f 100644 |
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
@@ -2,6 +2,8 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+import 'dart:async'; |
+ |
import 'package:analysis_server/src/analysis_server.dart'; |
import 'package:analysis_server/src/computer/computer_highlights.dart'; |
import 'package:analysis_server/src/computer/computer_highlights2.dart'; |
@@ -38,14 +40,15 @@ runWithActiveContext(AnalysisContext context, f()) { |
} |
} |
-scheduleImplementedNotification( |
+Future<Null> scheduleImplementedNotification( |
AnalysisServer server, Iterable<String> files) async { |
SearchEngine searchEngine = server.searchEngine; |
if (searchEngine == null) { |
return; |
} |
for (String file in files) { |
- CompilationUnitElement unitElement = server.getCompilationUnitElement(file); |
+ CompilationUnit unit = await server.getResolvedCompilationUnit(file); |
+ CompilationUnitElement unitElement = unit?.element; |
if (unitElement != null) { |
try { |
ImplementedComputer computer = |