| 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 973b831d2393dc55b5543a93510e63b1b2ef6181..1e430d500850906c5e4bc6b21a21e0c68c97cfed 100644
|
| --- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
|
| +++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
|
| @@ -64,9 +64,10 @@ scheduleImplementedNotification(
|
| /**
|
| * Schedules indexing of the given [file] using the resolved [dartUnit].
|
| */
|
| -void scheduleIndexOperation(AnalysisServer server, String file,
|
| - AnalysisContext context, CompilationUnit dartUnit) {
|
| +void scheduleIndexOperation(
|
| + AnalysisServer server, String file, CompilationUnit dartUnit) {
|
| if (server.index != null) {
|
| + AnalysisContext context = dartUnit.element.context;
|
| server.addOperation(new _DartIndexOperation(context, file, dartUnit));
|
| }
|
| }
|
| @@ -414,7 +415,7 @@ class PerformAnalysisOperation extends ServerOperation {
|
| try {
|
| CompilationUnit dartUnit = notice.resolvedDartUnit;
|
| if (dartUnit != null) {
|
| - server.addOperation(new _DartIndexOperation(context, file, dartUnit));
|
| + scheduleIndexOperation(server, file, dartUnit);
|
| }
|
| } catch (exception, stackTrace) {
|
| server.sendServerErrorNotification(exception, stackTrace);
|
| @@ -459,6 +460,7 @@ class _DartIndexOperation extends _SingleFileOperation {
|
| ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() {
|
| try {
|
| Index index = server.index;
|
| + AnalysisContext context = unit.element.context;
|
| index.index(context, unit);
|
| } catch (exception, stackTrace) {
|
| server.sendServerErrorNotification(exception, stackTrace);
|
|
|