Skip to content

Commit 292e92b

Browse files
scheglovCommit Bot
authored andcommitted
Move more completion override tests to run on both protocols.
Change-Id: I082fdd06918cc6589314f9e3e0bab68ee52e28d9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244726 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com>
1 parent 1e04fe1 commit 292e92b

File tree

6 files changed

+403
-620
lines changed

6 files changed

+403
-620
lines changed

pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ class SuggestionBuilder {
974974
withNullability: _isNonNullableByDefault);
975975
_addSuggestion(
976976
suggestion,
977-
textToMatchOverride: element.displayName,
977+
textToMatchOverride: _textToMatchOverride(element),
978978
);
979979
}
980980

@@ -1502,6 +1502,13 @@ class SuggestionBuilder {
15021502
suggestion.docSummary = doc.summary;
15031503
}
15041504
}
1505+
1506+
static String _textToMatchOverride(ExecutableElement element) {
1507+
if (element.isOperator) {
1508+
return 'operator';
1509+
}
1510+
return element.displayName;
1511+
}
15051512
}
15061513

15071514
abstract class SuggestionListener {

0 commit comments

Comments
 (0)