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 971e52725f0df2684a46b2804d61014f883b9f4f..b783e84c903fb39f5c64875930cd68de35186023 100644 |
--- a/pkg/analysis_server/lib/src/protocol_server.dart |
+++ b/pkg/analysis_server/lib/src/protocol_server.dart |
@@ -91,6 +91,29 @@ AnalysisError newAnalysisError_fromEngine(engine.LineInfo lineInfo, |
/** |
* Construct based on a value from the analyzer engine. |
*/ |
+Element newElement_fromEngine(engine.Element element) { |
+ String name = element.displayName; |
+ String elementParameters = _getParametersString(element); |
+ String elementReturnType = _getReturnTypeString(element); |
+ return new Element( |
+ newElementKind_fromEngine(element.kind), |
+ name, |
+ Element.makeFlags( |
+ isPrivate: element.isPrivate, |
+ isDeprecated: element.isDeprecated, |
+ isAbstract: _isAbstract(element), |
+ isConst: _isConst(element), |
+ isFinal: _isFinal(element), |
+ isStatic: _isStatic(element)), |
+ location: newLocation_fromElement(element), |
+ parameters: elementParameters, |
+ returnType: elementReturnType); |
+} |
+ |
+ |
+/** |
+ * Construct based on a value from the analyzer engine. |
+ */ |
ElementKind newElementKind_fromEngine(engine.ElementKind kind) { |
if (kind == engine.ElementKind.CLASS) { |
return ElementKind.CLASS; |
@@ -145,29 +168,6 @@ ElementKind newElementKind_fromEngine(engine.ElementKind kind) { |
/** |
- * Construct based on a value from the analyzer engine. |
- */ |
-Element newElement_fromEngine(engine.Element element) { |
- String name = element.displayName; |
- String elementParameters = _getParametersString(element); |
- String elementReturnType = _getReturnTypeString(element); |
- return new Element( |
- newElementKind_fromEngine(element.kind), |
- name, |
- Element.makeFlags( |
- isPrivate: element.isPrivate, |
- isDeprecated: element.isDeprecated, |
- isAbstract: _isAbstract(element), |
- isConst: _isConst(element), |
- isFinal: _isFinal(element), |
- isStatic: _isStatic(element)), |
- location: newLocation_fromElement(element), |
- parameters: elementParameters, |
- returnType: elementReturnType); |
-} |
- |
- |
-/** |
* Create a Location based on an [engine.Element]. |
*/ |
Location newLocation_fromElement(engine.Element element) { |
@@ -240,6 +240,17 @@ OverriddenMember newOverriddenMember_fromEngine(engine.Element member) { |
/** |
* Construct based on a value from the search engine. |
*/ |
+SearchResult newSearchResult_fromMatch(engine.SearchMatch match) { |
+ SearchResultKind kind = newSearchResultKind_fromEngine(match.kind); |
+ Location location = newLocation_fromMatch(match); |
+ List<Element> path = _computePath(match.element); |
+ return new SearchResult(location, kind, !match.isResolved, path); |
+} |
+ |
+ |
+/** |
+ * Construct based on a value from the search engine. |
+ */ |
SearchResultKind newSearchResultKind_fromEngine(engine.MatchKind kind) { |
if (kind == engine.MatchKind.DECLARATION) { |
return SearchResultKind.DECLARATION; |
@@ -264,17 +275,6 @@ SearchResultKind newSearchResultKind_fromEngine(engine.MatchKind kind) { |
/** |
- * Construct based on a value from the search engine. |
- */ |
-SearchResult newSearchResult_fromMatch(engine.SearchMatch match) { |
- SearchResultKind kind = newSearchResultKind_fromEngine(match.kind); |
- Location location = newLocation_fromMatch(match); |
- List<Element> path = _computePath(match.element); |
- return new SearchResult(location, kind, !match.isResolved, path); |
-} |
- |
- |
-/** |
* Construct based on a SourceRange. |
*/ |
SourceEdit newSourceEdit_range(engine.SourceRange range, String replacement, |