| 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 a8ecb318baaefde9cab732fa8cf561f1e258202a..f9e1e2377940d2e87d55ece8bc2a4bd87110a223 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/completion_core.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/completion_core.dart
|
| @@ -9,7 +9,6 @@ import 'package:analysis_server/src/provisional/completion/completion_core.dart'
|
| import 'package:analysis_server/src/services/completion/completion_performance.dart';
|
| import 'package:analyzer/file_system/file_system.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';
|
|
|
| /**
|
| @@ -20,19 +19,8 @@ class CompletionRequestImpl implements CompletionRequest {
|
| final AnalysisResult result;
|
|
|
| @override
|
| - final AnalysisContext context;
|
| -
|
| - @override
|
| final Source source;
|
|
|
| - /**
|
| - * The content cache modification stamp of the associated [source],
|
| - * or `null` if the content cache does not override the [source] content.
|
| - * This is used to determine if the [source] contents have been modified
|
| - * after the completion request was made.
|
| - */
|
| - final int sourceModificationStamp;
|
| -
|
| @override
|
| final int offset;
|
|
|
| @@ -67,31 +55,15 @@ class CompletionRequestImpl implements CompletionRequest {
|
| /**
|
| * Initialize a newly created completion request based on the given arguments.
|
| */
|
| - CompletionRequestImpl(
|
| - this.result,
|
| - AnalysisContext context,
|
| - this.resourceProvider,
|
| - Source source,
|
| - int offset,
|
| - this.performance,
|
| - this.ideOptions)
|
| - : this.context = context,
|
| - this.source = source,
|
| + CompletionRequestImpl(this.result, this.resourceProvider, Source source,
|
| + int offset, this.performance, this.ideOptions)
|
| + : this.source = source,
|
| this.offset = offset,
|
| replacementOffset = offset,
|
| - replacementLength = 0,
|
| - sourceModificationStamp = context?.getModificationStamp(source);
|
| -
|
| - /**
|
| - * Return the original text from the [replacementOffset] to the [offset]
|
| - * that can be used to filter the suggestions on the server side.
|
| - */
|
| - String get filterText {
|
| - return sourceContents.substring(replacementOffset, offset);
|
| - }
|
| + replacementLength = 0;
|
|
|
| @override
|
| - String get sourceContents => context.getContents(source)?.data;
|
| + String get sourceContents => result.content;
|
|
|
| /**
|
| * Abort the current completion request.
|
| @@ -105,9 +77,5 @@ class CompletionRequestImpl implements CompletionRequest {
|
| if (_aborted) {
|
| throw new AbortCompletion();
|
| }
|
| - if (sourceModificationStamp != context?.getModificationStamp(source)) {
|
| - _aborted = true;
|
| - throw new AbortCompletion();
|
| - }
|
| }
|
| }
|
|
|