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

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

Issue 2671533002: complete named params in constructors (Closed)
Patch Set: merge Created 3 years, 11 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
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 3b26f605c16df40d96fb3c05469ea56f80b94f11..ccfb1b3c9aefd3385c2cba84f74eb8624006df6f 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
@@ -204,12 +204,8 @@ class ArgListContributor extends DartCompletionContributor {
// Generate argument list suggestion based upon the type of element
if (elem is ClassElement) {
- for (ConstructorElement constructor in elem.constructors) {
- if (!constructor.isFactory) {
- _addSuggestions(constructor.parameters);
- return suggestions;
- }
- }
+ _addSuggestions(elem.unnamedConstructor?.parameters);
+ return suggestions;
}
if (elem is ConstructorElement) {
_addSuggestions(elem.parameters);
« no previous file with comments | « pkg/analysis_server/lib/src/domain_completion.dart ('k') | pkg/analysis_server/lib/src/services/completion/dart/optype.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698