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

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

Issue 2924633002: Remove unused IdeOptions (Closed)
Patch Set: reverse default 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
Index: pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
index 4034a4c838fd782a05126dbd99b9d7c25271b168..e49bdab5ddbd1489df1ec113591d92cf75664615 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
@@ -5,7 +5,6 @@
import 'dart:async';
import 'dart:collection';
-import 'package:analysis_server/src/ide_options.dart';
import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
import 'package:analyzer/dart/ast/ast.dart';
@@ -96,7 +95,7 @@ class TypeMemberContributor extends DartCompletionContributor {
// Build the suggestions
if (type is InterfaceType) {
_SuggestionBuilder builder = new _SuggestionBuilder(containingLibrary);
- builder.buildSuggestions(type, containingMethodName, request.ideOptions);
+ builder.buildSuggestions(type, containingMethodName);
return builder.suggestions.toList();
}
return EMPTY_LIST;
@@ -275,8 +274,7 @@ class _SuggestionBuilder {
* If the 'dot' completion is a super expression, then [containingMethodName]
* is the name of the method in which the completion is requested.
*/
- void buildSuggestions(
- InterfaceType type, String containingMethodName, IdeOptions ideOptions) {
+ void buildSuggestions(InterfaceType type, String containingMethodName) {
// Visit all of the types in the class hierarchy, collecting possible
// completions. If multiple elements are found that complete to the same
// identifier, addSuggestion will discard all but the first (with a few
@@ -288,7 +286,7 @@ class _SuggestionBuilder {
if (!method.isStatic) {
// Boost the relevance of a super expression
// calling a method of the same name as the containing method
- _addSuggestion(method, ideOptions,
+ _addSuggestion(method,
relevance: method.name == containingMethodName
? DART_RELEVANCE_HIGH
: DART_RELEVANCE_DEFAULT);
@@ -299,10 +297,10 @@ class _SuggestionBuilder {
if (propertyAccessor.isSynthetic) {
// Avoid visiting a field twice
if (propertyAccessor.isGetter) {
- _addSuggestion(propertyAccessor.variable, ideOptions);
+ _addSuggestion(propertyAccessor.variable);
}
} else {
- _addSuggestion(propertyAccessor, ideOptions);
+ _addSuggestion(propertyAccessor);
}
}
}
@@ -313,7 +311,7 @@ class _SuggestionBuilder {
* Add a suggestion based upon the given element, provided that it is not
* shadowed by a previously added suggestion.
*/
- void _addSuggestion(Element element, IdeOptions options,
+ void _addSuggestion(Element element,
{int relevance: DART_RELEVANCE_DEFAULT}) {
if (element.isPrivate) {
if (element.library != containingLibrary) {
@@ -368,7 +366,7 @@ class _SuggestionBuilder {
return;
}
CompletionSuggestion suggestion =
- createSuggestion(element, options, relevance: relevance);
+ createSuggestion(element, relevance: relevance);
if (suggestion != null) {
_suggestionMap[suggestion.completion] = suggestion;
}

Powered by Google App Engine
This is Rietveld 408576698