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

Unified Diff: pkg/analysis_services/lib/completion/completion_suggestion.dart

Issue 463493003: rename CompletionSuggestionKind.VARIABLE to LOCAL_VARIABLE to match spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 4 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_services/lib/completion/completion_suggestion.dart
diff --git a/pkg/analysis_services/lib/completion/completion_suggestion.dart b/pkg/analysis_services/lib/completion/completion_suggestion.dart
index af468bcfa5fc5225d90c4213000a48df9f699f37..1825fdea5872292791bd524f0316baa790667eca 100644
--- a/pkg/analysis_services/lib/completion/completion_suggestion.dart
+++ b/pkg/analysis_services/lib/completion/completion_suggestion.dart
@@ -143,6 +143,8 @@ class CompletionSuggestionKind {
const CompletionSuggestionKind('IMPORT');
static const CompletionSuggestionKind LIBRARY_PREFIX =
const CompletionSuggestionKind('LIBRARY_PREFIX');
+ static const CompletionSuggestionKind LOCAL_VARIABLE =
+ const CompletionSuggestionKind('LOCAL_VARIABLE');
static const CompletionSuggestionKind METHOD =
const CompletionSuggestionKind('METHOD');
static const CompletionSuggestionKind METHOD_NAME =
@@ -159,10 +161,6 @@ class CompletionSuggestionKind {
const CompletionSuggestionKind('TOP_LEVEL_VARIABLE');
static const CompletionSuggestionKind TYPE_PARAMETER =
const CompletionSuggestionKind('TYPE_PARAMETER');
- // TODO (danrubel) consider renaming VARIABLE --> LOCAL_VARIABLE
- // to match ElementKind.LOCAL_VARIABLE
- static const CompletionSuggestionKind VARIABLE =
- const CompletionSuggestionKind('VARIABLE');
final String name;
@@ -196,7 +194,7 @@ class CompletionSuggestionKind {
if (kind == ElementKind.IMPORT) return IMPORT;
// ElementKind.LABEL,
// ElementKind.LIBRARY,
- if (kind == ElementKind.LOCAL_VARIABLE) return VARIABLE;
+ if (kind == ElementKind.LOCAL_VARIABLE) return LOCAL_VARIABLE;
if (kind == ElementKind.METHOD) return METHOD;
// ElementKind.NAME,
if (kind == ElementKind.PARAMETER) return PARAMETER;
@@ -222,6 +220,7 @@ class CompletionSuggestionKind {
if (GETTER.name == name) return GETTER;
if (IMPORT.name == name) return IMPORT;
if (LIBRARY_PREFIX.name == name) return LIBRARY_PREFIX;
+ if (LOCAL_VARIABLE.name == name) return LOCAL_VARIABLE;
if (METHOD.name == name) return METHOD;
if (METHOD_NAME.name == name) return METHOD_NAME;
if (NAMED_ARGUMENT.name == name) return NAMED_ARGUMENT;
@@ -230,7 +229,6 @@ class CompletionSuggestionKind {
if (SETTER.name == name) return SETTER;
if (TOP_LEVEL_VARIABLE.name == name) return TOP_LEVEL_VARIABLE;
if (TYPE_PARAMETER.name == name) return TYPE_PARAMETER;
- if (VARIABLE.name == name) return VARIABLE;
throw new ArgumentError('Unknown CompletionSuggestionKind: $name');
}
}
« no previous file with comments | « pkg/analysis_server/test/domain_completion_test.dart ('k') | pkg/analysis_services/lib/src/completion/local_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698