| Index: pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
|
| index 1264d3064a7a561fb418445167236fa8f99ae57c..5426d294ad60a3b8deefd78f3bc2b8e9779ef4d0 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
|
| @@ -15,6 +15,7 @@ import 'package:analysis_server/src/services/completion/imported_computer.dart';
|
| import 'package:analysis_server/src/services/completion/invocation_computer.dart';
|
| import 'package:analysis_server/src/services/completion/keyword_computer.dart';
|
| import 'package:analysis_server/src/services/completion/local_computer.dart';
|
| +import 'package:analysis_server/src/services/completion/optype.dart';
|
| import 'package:analysis_server/src/services/search/search_engine.dart';
|
| import 'package:analyzer/src/generated/ast.dart';
|
| import 'package:analyzer/src/generated/engine.dart';
|
| @@ -237,6 +238,11 @@ class DartCompletionRequest extends CompletionRequest {
|
| AstNode node;
|
|
|
| /**
|
| + * Information about the types of suggestions that should be included.
|
| + */
|
| + OpType _optype;
|
| +
|
| + /**
|
| * The offset of the start of the text to be replaced.
|
| * This will be different than the offset used to request the completion
|
| * suggestions if there was a portion of an identifier before the original
|
| @@ -269,6 +275,17 @@ class DartCompletionRequest extends CompletionRequest {
|
| return context.getContents(
|
| source).data.substring(replacementOffset, offset);
|
| }
|
| +
|
| + /**
|
| + * Information about the types of suggestions that should be included.
|
| + * This will return `null` if the [node] has not been set.
|
| + */
|
| + OpType get optype {
|
| + if (_optype == null && node != null) {
|
| + _optype = new OpType.forCompletion(node, offset);
|
| + }
|
| + return _optype;
|
| + }
|
| }
|
|
|
| /**
|
|
|