Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart

Issue 2927343002: Prioritize required name param completions (flutter-intellij#1049). (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
index 92ed30109e5866d3bc8dcc01c4ae2384fdb26157..12e58eec3b4a53bed4d5f16160821d926ba38a5d 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
@@ -254,9 +254,14 @@ class ArgListContributor extends DartCompletionContributor {
if (appendComma) {
completion += ',';
}
+
+ final int relevance = parameter.isRequired
+ ? DART_RELEVANCE_NAMED_PARAMETER_REQUIRED
+ : DART_RELEVANCE_NAMED_PARAMETER;
+
CompletionSuggestion suggestion = new CompletionSuggestion(
CompletionSuggestionKind.NAMED_ARGUMENT,
- DART_RELEVANCE_NAMED_PARAMETER,
+ relevance,
completion,
selectionOffset,
0,
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698