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

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

Issue 1514613003: remove argument list suggestions - fixes #25197 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 999aaeca00b3351423a14ceb874cf7a560dae4a5..29f463b66db833d5cf1bd8b2fd57fc1e41294dca 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
@@ -188,32 +188,35 @@ class ArgListContributor extends DartCompletionContributor {
}
void _addArgListSuggestion(Iterable<ParameterElement> requiredParam) {
- StringBuffer completion = new StringBuffer('(');
- List<String> paramNames = new List<String>();
- List<String> paramTypes = new List<String>();
- for (ParameterElement param in requiredParam) {
- String name = param.name;
- if (name != null && name.length > 0) {
- if (completion.length > 1) {
- completion.write(', ');
- }
- completion.write(name);
- paramNames.add(name);
- paramTypes.add(_getParamType(param));
- }
- }
- completion.write(')');
- CompletionSuggestion suggestion = new CompletionSuggestion(
- CompletionSuggestionKind.ARGUMENT_LIST,
- DART_RELEVANCE_HIGH,
- completion.toString(),
- completion.length,
- 0,
- false,
- false);
- suggestion.parameterNames = paramNames;
- suggestion.parameterTypes = paramTypes;
- suggestions.add(suggestion);
+ // DEPRECATED... argument lists are no longer suggested.
+ // See https://github.com/dart-lang/sdk/issues/25197
+
+ // StringBuffer completion = new StringBuffer('(');
+ // List<String> paramNames = new List<String>();
+ // List<String> paramTypes = new List<String>();
+ // for (ParameterElement param in requiredParam) {
+ // String name = param.name;
+ // if (name != null && name.length > 0) {
+ // if (completion.length > 1) {
+ // completion.write(', ');
+ // }
+ // completion.write(name);
+ // paramNames.add(name);
+ // paramTypes.add(_getParamType(param));
+ // }
+ // }
+ // completion.write(')');
+ // CompletionSuggestion suggestion = new CompletionSuggestion(
+ // CompletionSuggestionKind.ARGUMENT_LIST,
+ // DART_RELEVANCE_HIGH,
+ // completion.toString(),
+ // completion.length,
+ // 0,
+ // false,
+ // false);
+ // suggestion.parameterNames = paramNames;
+ // suggestion.parameterTypes = paramTypes;
+ // suggestions.add(suggestion);
}
void _addDefaultParamSuggestions(Iterable<ParameterElement> parameters) {
« 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