| Index: pkg/analysis_server/lib/src/services/completion/completion_core.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/completion_core.dart b/pkg/analysis_server/lib/src/services/completion/completion_core.dart
|
| index b79a9d84567ebc8c4efa47255357dae4244e8b97..c43a144d0763dcf0e9c723b755ea96d8aa9ec86b 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/completion_core.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/completion_core.dart
|
| @@ -8,7 +8,8 @@ import 'package:analysis_server/src/provisional/completion/completion_core.dart'
|
| import 'package:analysis_server/src/services/completion/completion_performance.dart';
|
| import 'package:analysis_server/src/services/search/search_engine.dart';
|
| import 'package:analyzer/file_system/file_system.dart';
|
| -import 'package:analyzer/src/generated/engine.dart';
|
| +import 'package:analyzer/src/dart/analysis/driver.dart';
|
| +import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
|
| import 'package:analyzer/src/generated/source.dart';
|
|
|
| /**
|
| @@ -16,6 +17,9 @@ import 'package:analyzer/src/generated/source.dart';
|
| */
|
| class CompletionRequestImpl implements CompletionRequest {
|
| @override
|
| + final AnalysisResult result;
|
| +
|
| + @override
|
| final AnalysisContext context;
|
|
|
| @override
|
| @@ -63,14 +67,20 @@ class CompletionRequestImpl implements CompletionRequest {
|
| /**
|
| * Initialize a newly created completion request based on the given arguments.
|
| */
|
| - CompletionRequestImpl(AnalysisContext context, this.resourceProvider,
|
| - this.searchEngine, Source source, int offset, this.performance)
|
| + CompletionRequestImpl(
|
| + this.result,
|
| + AnalysisContext context,
|
| + this.resourceProvider,
|
| + this.searchEngine,
|
| + Source source,
|
| + int offset,
|
| + this.performance)
|
| : this.context = context,
|
| this.source = source,
|
| this.offset = offset,
|
| replacementOffset = offset,
|
| replacementLength = 0,
|
| - sourceModificationStamp = context.getModificationStamp(source);
|
| + sourceModificationStamp = context?.getModificationStamp(source);
|
|
|
| /**
|
| * Return the original text from the [replacementOffset] to the [offset]
|
| @@ -95,7 +105,7 @@ class CompletionRequestImpl implements CompletionRequest {
|
| if (_aborted) {
|
| throw new AbortCompletion();
|
| }
|
| - if (sourceModificationStamp != context.getModificationStamp(source)) {
|
| + if (sourceModificationStamp != context?.getModificationStamp(source)) {
|
| _aborted = true;
|
| throw new AbortCompletion();
|
| }
|
|
|