| Index: pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
|
| index 5c10beb8d9779750f8a1087686068a4eba202a7c..b019d30edb7558028d2fb54e0c0a18a9c84d6a26 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
|
| @@ -112,17 +112,19 @@ class LibraryElementSuggestionBuilder extends GeneralizingElementVisitor
|
|
|
| @override
|
| void visitPropertyAccessorElement(PropertyAccessorElement element) {
|
| - int relevance;
|
| - if (element.library == containingLibrary) {
|
| - if (element.enclosingElement is ClassElement) {
|
| - relevance = DART_RELEVANCE_LOCAL_FIELD;
|
| + if (optype.includeReturnValueSuggestions) {
|
| + int relevance;
|
| + if (element.library == containingLibrary) {
|
| + if (element.enclosingElement is ClassElement) {
|
| + relevance = DART_RELEVANCE_LOCAL_FIELD;
|
| + } else {
|
| + relevance = DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE;
|
| + }
|
| } else {
|
| - relevance = DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE;
|
| + relevance = DART_RELEVANCE_DEFAULT;
|
| }
|
| - } else {
|
| - relevance = DART_RELEVANCE_DEFAULT;
|
| + addSuggestion(element, prefix: prefix, relevance: relevance);
|
| }
|
| - addSuggestion(element, prefix: prefix, relevance: relevance);
|
| }
|
|
|
| @override
|
|
|