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

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

Issue 904603004: rename completion constants and cleanup comment (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/keyword_computer.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/keyword_computer.dart b/pkg/analysis_server/lib/src/services/completion/keyword_computer.dart
index ed1cf1097215d7a5813d198374e0a41c22bdc41c..b9588be40469dad2a070651fd668d949d93eb22b 100644
--- a/pkg/analysis_server/lib/src/services/completion/keyword_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/keyword_computer.dart
@@ -116,18 +116,18 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
if (firstDirective is! LibraryDirective) {
if (firstDirective != null) {
if (request.offset <= firstDirective.offset) {
- _addSuggestions([Keyword.LIBRARY], COMPLETION_RELEVANCE_HIGH);
+ _addSuggestions([Keyword.LIBRARY], DART_RELEVANCE_HIGH);
}
} else {
if (request.offset <= startOfDeclarations) {
- _addSuggestions([Keyword.LIBRARY], COMPLETION_RELEVANCE_HIGH);
+ _addSuggestions([Keyword.LIBRARY], DART_RELEVANCE_HIGH);
}
}
}
if (request.offset <= startOfDeclarations) {
_addSuggestions(
[Keyword.EXPORT, Keyword.IMPORT, Keyword.PART],
- COMPLETION_RELEVANCE_HIGH);
+ DART_RELEVANCE_HIGH);
}
if (request.offset >= endOfDirectives) {
_addSuggestions(
@@ -138,7 +138,7 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
Keyword.FINAL,
Keyword.TYPEDEF,
Keyword.VAR],
- COMPLETION_RELEVANCE_HIGH);
+ DART_RELEVANCE_HIGH);
}
}
@@ -190,17 +190,17 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
// Very simplistic suggestion because analyzer will warn if
// the extends / with / implements keywords are out of order
if (node.extendsClause == null) {
- _addSuggestion(Keyword.EXTENDS, COMPLETION_RELEVANCE_HIGH);
+ _addSuggestion(Keyword.EXTENDS, DART_RELEVANCE_HIGH);
} else if (node.withClause == null) {
- _addSuggestion(Keyword.WITH, COMPLETION_RELEVANCE_HIGH);
+ _addSuggestion(Keyword.WITH, DART_RELEVANCE_HIGH);
}
if (node.implementsClause == null) {
- _addSuggestion(Keyword.IMPLEMENTS, COMPLETION_RELEVANCE_HIGH);
+ _addSuggestion(Keyword.IMPLEMENTS, DART_RELEVANCE_HIGH);
}
}
void _addSuggestion(Keyword keyword, [int relevance =
- COMPLETION_RELEVANCE_DEFAULT]) {
+ DART_RELEVANCE_DEFAULT]) {
String completion = keyword.syntax;
request.suggestions.add(
new CompletionSuggestion(

Powered by Google App Engine
This is Rietveld 408576698