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

Unified Diff: pkg/analysis_server/lib/src/computer/element.dart

Issue 492243002: Introduce convenience methods into generated analysis server classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/computer/error.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/computer/element.dart
diff --git a/pkg/analysis_server/lib/src/computer/element.dart b/pkg/analysis_server/lib/src/computer/element.dart
index 811672fba84a69082a43c0db03fe29ffaa614e9b..1bd69b9c73b0fe6ab5bce73a6d4b4b241e85e1e6 100644
--- a/pkg/analysis_server/lib/src/computer/element.dart
+++ b/pkg/analysis_server/lib/src/computer/element.dart
@@ -77,7 +77,7 @@ class Element {
String elementParameters = _getParametersString(element);
String elementReturnType = _getReturnTypeString(element);
return new Element(
- elementKindFromEngine(element.kind),
+ new ElementKind.fromEngine(element.kind),
name,
new Location.fromElement(element),
element.isPrivate,
@@ -225,53 +225,6 @@ class Element {
}
-ElementKind elementKindFromEngine(engine.ElementKind kind) {
- if (kind == engine.ElementKind.CLASS) {
- return ElementKind.CLASS;
- }
- if (kind == engine.ElementKind.COMPILATION_UNIT) {
- return ElementKind.COMPILATION_UNIT;
- }
- if (kind == engine.ElementKind.CONSTRUCTOR) {
- return ElementKind.CONSTRUCTOR;
- }
- if (kind == engine.ElementKind.FIELD) {
- return ElementKind.FIELD;
- }
- if (kind == engine.ElementKind.FUNCTION) {
- return ElementKind.FUNCTION;
- }
- if (kind == engine.ElementKind.FUNCTION_TYPE_ALIAS) {
- return ElementKind.FUNCTION_TYPE_ALIAS;
- }
- if (kind == engine.ElementKind.GETTER) {
- return ElementKind.GETTER;
- }
- if (kind == engine.ElementKind.LIBRARY) {
- return ElementKind.LIBRARY;
- }
- if (kind == engine.ElementKind.LOCAL_VARIABLE) {
- return ElementKind.LOCAL_VARIABLE;
- }
- if (kind == engine.ElementKind.METHOD) {
- return ElementKind.METHOD;
- }
- if (kind == engine.ElementKind.PARAMETER) {
- return ElementKind.PARAMETER;
- }
- if (kind == engine.ElementKind.SETTER) {
- return ElementKind.SETTER;
- }
- if (kind == engine.ElementKind.TOP_LEVEL_VARIABLE) {
- return ElementKind.TOP_LEVEL_VARIABLE;
- }
- if (kind == engine.ElementKind.TYPE_PARAMETER) {
- return ElementKind.TYPE_PARAMETER;
- }
- return ElementKind.UNKNOWN;
-}
-
-
/**
* Information about a location.
*/
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/computer/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698