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

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

Issue 1911803004: Code Completion refactoring, follow up on comment in https://codereview.chromium.org/1908703002/ to… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase with master Created 4 years, 8 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/lib/src/services/completion/dart/local_library_contributor.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/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 9344e15d44de11e2c426d49c20ecc484334fdb82..8778f6c22efa269307a7523616ff456e570f04ee 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
@@ -245,13 +245,11 @@ class _Visitor extends LocalDeclarationVisitor {
ClassDeclaration classDecl, ConstructorDeclaration constructorDecl) {
String completion = classDecl.name.name;
SimpleIdentifier elemId;
- int relevance = DART_RELEVANCE_DEFAULT;
- int filter = optype.constructorSuggestionsFilter(classDecl.element?.type);
- if (filter == null) {
+ int relevance = optype.constructorSuggestionsFilter(
+ classDecl.element?.type, DART_RELEVANCE_DEFAULT);
+ if (relevance == null) {
return;
- } else {
- relevance += filter;
}
// Build a suggestion for explicitly declared constructor
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698