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

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

Issue 2873943003: cleanup dart code completion contributors (Closed)
Patch Set: rebase Created 3 years, 7 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/local_constructor_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
index e5dc58e66b454d44c4f996ecc292156b3b98997c..a50261552e1acf97dac706aef2e9e7aa92e8e54f 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
@@ -37,16 +37,8 @@ class LocalConstructorContributor extends DartCompletionContributor {
List<CompletionSuggestion> suggestions = <CompletionSuggestion>[];
if (!optype.isPrefixed) {
if (optype.includeConstructorSuggestions) {
- AstNode node = request.target.containingNode;
-
- await request.resolveContainingStatement(node);
-
- // Discard any cached target information
- // because it may have changed as a result of the resolution
- node = request.target.containingNode;
-
- _Visitor visitor = new _Visitor(request, suggestions, optype);
- visitor.visit(node);
+ new _Visitor(request, suggestions, optype)
+ .visit(request.target.containingNode);
}
}
return suggestions;

Powered by Google App Engine
This is Rietveld 408576698