Skip to content

Commit

Permalink
Copy 'className' field into the API structure.
Browse files Browse the repository at this point in the history
R=brianwilkerson@google.com, devoncarew@google.com

Bug: #29510
Change-Id: Ie95f4b59dfa15fc085694317883b0c2fd81c1fbb
Reviewed-on: https://dart-review.googlesource.com/43160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
  • Loading branch information
scheglov authored and commit-bot@chromium.org committed Feb 22, 2018
1 parent 0ce1a92 commit 9b71ba7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/analysis_server/doc/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<body>
<h1>Analysis Server API Specification</h1>
<h1 style="color:#999999">Version
1.18.6
1.18.7
</h1>
<p>
This document contains a specification of the API provided by the
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/lib/src/analysis_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class AnalysisServer {
* The version of the analysis server. The value should be replaced
* automatically during the build.
*/
static final String VERSION = '1.18.6';
static final String VERSION = '1.18.7';

/**
* The options of this server instance.
Expand Down
3 changes: 2 additions & 1 deletion pkg/analysis_server/lib/src/search/search_domain.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ class SearchDomainHandler implements protocol.RequestHandler {
declaration.fileIndex,
declaration.offset,
declaration.line,
declaration.column);
declaration.column,
className: declaration.className);
}).toList();

server.sendResponse(new protocol.SearchGetElementDeclarationsResult(
Expand Down
15 changes: 8 additions & 7 deletions pkg/analysis_server/test/search/declarations_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ main() {
class DeclarationsTest extends AbstractSearchDomainTest {
SearchGetElementDeclarationsResult declarationsResult;

void assertHas(String name, ElementKind kind) {
void assertHas(String name, ElementKind kind, {String className}) {
declarationsResult.declarations.singleWhere((d) =>
declarationsResult.files[d.fileIndex] == testFile &&
d.name == name &&
d.kind == kind);
d.kind == kind &&
d.className == className);
}

test_class() async {
Expand All @@ -43,11 +44,11 @@ class C {
await _getDeclarations();

assertHas('C', ElementKind.CLASS);
assertHas('f', ElementKind.FIELD);
assertHas('named', ElementKind.CONSTRUCTOR);
assertHas('g', ElementKind.GETTER);
assertHas('s', ElementKind.SETTER);
assertHas('m', ElementKind.METHOD);
assertHas('f', ElementKind.FIELD, className: 'C');
assertHas('named', ElementKind.CONSTRUCTOR, className: 'C');
assertHas('g', ElementKind.GETTER, className: 'C');
assertHas('s', ElementKind.SETTER, className: 'C');
assertHas('m', ElementKind.METHOD, className: 'C');
}

test_enum() async {
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/tool/spec/spec_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<h1>Analysis Server API Specification</h1>
<h1 style="color:#999999">Version
<version>1.18.6</version>
<version>1.18.7</version>
</h1>
<p>
This document contains a specification of the API provided by the
Expand Down

0 comments on commit 9b71ba7

Please sign in to comment.