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

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

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 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,
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/lib/src/search/element_references.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698