| 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 ec5cd4c21d2a9452af6976d8894e4fca1c904d5c..2adcf96e5c0950fe626e1dc99f553bd050685ba1 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
|
| @@ -61,6 +61,11 @@ class DartCompletionManager implements CompletionContributor {
|
| class DartCompletionRequestImpl extends CompletionRequestImpl
|
| implements DartCompletionRequest {
|
| /**
|
| + * The [LibraryElement] representing dart:core
|
| + */
|
| + LibraryElement _coreLib;
|
| +
|
| + /**
|
| * The [DartType] for Object in dart:core
|
| */
|
| InterfaceType _objectType;
|
| @@ -89,6 +94,15 @@ class DartCompletionRequestImpl extends CompletionRequestImpl
|
| }
|
|
|
| @override
|
| + LibraryElement get coreLib {
|
| + if (_coreLib == null) {
|
| + Source coreUri = context.sourceFactory.forUri('dart:core');
|
| + _coreLib = context.computeLibraryElement(coreUri);
|
| + }
|
| + return _coreLib;
|
| + }
|
| +
|
| + @override
|
| bool get includeIdentifiers {
|
| opType; // <<< ensure _opType is initialized
|
| return !_opType.isPrefixed &&
|
| @@ -114,8 +128,6 @@ class DartCompletionRequestImpl extends CompletionRequestImpl
|
| @override
|
| InterfaceType get objectType {
|
| if (_objectType == null) {
|
| - Source coreUri = context.sourceFactory.forUri('dart:core');
|
| - LibraryElement coreLib = context.computeLibraryElement(coreUri);
|
| _objectType = coreLib.getType('Object').type;
|
| }
|
| return _objectType;
|
|
|