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 0c4c85f8043f46490f8a71d307a538ffe5af0f2c..12595bad737678eeb0f40e859e7306c4f5da1050 100644 |
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart |
@@ -17,6 +17,7 @@ import 'package:analysis_server/src/protocol_server.dart' as protocol; |
import 'package:analysis_server/src/services/dependencies/library_dependencies.dart'; |
import 'package:analysis_server/src/services/search/search_engine.dart'; |
import 'package:analyzer/dart/ast/ast.dart'; |
+import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
import 'package:analyzer/dart/element/element.dart'; |
import 'package:analyzer/error/error.dart'; |
import 'package:analyzer/src/generated/engine.dart'; |
@@ -71,7 +72,8 @@ scheduleImplementedNotification( |
void scheduleIndexOperation( |
AnalysisServer server, String file, CompilationUnit dartUnit) { |
if (server.index != null) { |
- AnalysisContext context = dartUnit.element.context; |
+ AnalysisContext context = |
+ resolutionMap.elementForCompilationUnit(dartUnit).context; |
server.addOperation(new _DartIndexOperation(context, file, dartUnit)); |
} |
} |