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

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

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Address review comments Created 4 years 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
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));
}
}

Powered by Google App Engine
This is Rietveld 408576698