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

Unified Diff: pkg/analysis_server/lib/src/protocol_server.dart

Issue 684183002: Refactor CompletionSuggestionKind (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 2 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/protocol_server.dart
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index c97e96cd954f8e35c5bff902e033159da1f2553e..971e52725f0df2684a46b2804d61014f883b9f4f 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -89,61 +89,6 @@ AnalysisError newAnalysisError_fromEngine(engine.LineInfo lineInfo,
/**
- * Construct from an analyzer engine element kind.
- */
-CompletionSuggestionKind
- newCompletionSuggestionKind_fromElementKind(engine.ElementKind kind) {
- // ElementKind.ANGULAR_FORMATTER,
- // ElementKind.ANGULAR_COMPONENT,
- // ElementKind.ANGULAR_CONTROLLER,
- // ElementKind.ANGULAR_DIRECTIVE,
- // ElementKind.ANGULAR_PROPERTY,
- // ElementKind.ANGULAR_SCOPE_PROPERTY,
- // ElementKind.ANGULAR_SELECTOR,
- // ElementKind.ANGULAR_VIEW,
- if (kind == engine.ElementKind.CLASS) return CompletionSuggestionKind.CLASS;
- // ElementKind.COMPILATION_UNIT,
- if (kind ==
- engine.ElementKind.CONSTRUCTOR) return CompletionSuggestionKind.CONSTRUCTOR;
- // ElementKind.DYNAMIC,
- // ElementKind.EMBEDDED_HTML_SCRIPT,
- // ElementKind.ERROR,
- // ElementKind.EXPORT,
- // ElementKind.EXTERNAL_HTML_SCRIPT,
- if (kind == engine.ElementKind.FIELD) return CompletionSuggestionKind.FIELD;
- if (kind ==
- engine.ElementKind.FUNCTION) return CompletionSuggestionKind.FUNCTION;
- if (kind ==
- engine.ElementKind.FUNCTION_TYPE_ALIAS) return
- CompletionSuggestionKind.FUNCTION_TYPE_ALIAS;
- if (kind == engine.ElementKind.GETTER) return CompletionSuggestionKind.GETTER;
- // ElementKind.HTML,
- if (kind == engine.ElementKind.IMPORT) return CompletionSuggestionKind.IMPORT;
- // ElementKind.LABEL,
- // ElementKind.LIBRARY,
- if (kind ==
- engine.ElementKind.LOCAL_VARIABLE) return
- CompletionSuggestionKind.LOCAL_VARIABLE;
- if (kind == engine.ElementKind.METHOD) return CompletionSuggestionKind.METHOD;
- // ElementKind.NAME,
- if (kind ==
- engine.ElementKind.PARAMETER) return CompletionSuggestionKind.PARAMETER;
- // ElementKind.POLYMER_ATTRIBUTE,
- // ElementKind.POLYMER_TAG_DART,
- // ElementKind.POLYMER_TAG_HTML,
- // ElementKind.PREFIX,
- if (kind == engine.ElementKind.SETTER) return CompletionSuggestionKind.SETTER;
- if (kind ==
- engine.ElementKind.TOP_LEVEL_VARIABLE) return
- CompletionSuggestionKind.TOP_LEVEL_VARIABLE;
- // ElementKind.TYPE_PARAMETER,
- // ElementKind.UNIVERSE
- throw new ArgumentError('Unknown CompletionSuggestionKind for: $kind');
-}
-
-
-
-/**
* Construct based on a value from the analyzer engine.
*/
ElementKind newElementKind_fromEngine(engine.ElementKind kind) {

Powered by Google App Engine
This is Rietveld 408576698