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 913e1f2bb2d1e9a9c74f1914c2f83043d987f9fd..071b678867d8f35ac1dcb5329106e1054e3802b5 100644 |
--- a/pkg/analysis_server/lib/src/protocol_server.dart |
+++ b/pkg/analysis_server/lib/src/protocol_server.dart |
@@ -87,7 +87,12 @@ Element newElement_fromEngine(engine.Element element) { |
String elementTypeParameters = _getTypeParametersString(element); |
String elementParameters = _getParametersString(element); |
String elementReturnType = _getReturnTypeString(element); |
- return new Element(newElementKind_fromEngine(element.kind), name, Element |
+ ElementKind kind = newElementKind_fromEngine(element.kind); |
+ // TODO(danrubel) this check should be in newElementKind_fromEngine |
+ if (element is engine.ClassElement && element.isEnum) { |
+ kind = ElementKind.ENUM; |
+ } |
+ return new Element(kind, name, Element |
.makeFlags( |
isPrivate: element.isPrivate, |
isDeprecated: element.isDeprecated, |
@@ -106,6 +111,7 @@ Element newElement_fromEngine(engine.Element element) { |
*/ |
ElementKind newElementKind_fromEngine(engine.ElementKind kind) { |
if (kind == engine.ElementKind.CLASS) { |
+ // TODO(danrubel) check if element.isEnum and return ElementKind.ENUM |
return ElementKind.CLASS; |
} |
if (kind == engine.ElementKind.COMPILATION_UNIT) { |