API for search.getElementDeclarations.

The goal is to provide clients (specifically VS Code) with API that
is fast, and can search top-level and class member declarations.

I'm not sure whether we want ElementKind, it has kinds that we will
not use, e.g. I don't think we will return local variables or
parameters.

It would be probably still a lot of information, maybe we should use
single string table in response?

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: Ie31bb398a08d462c1cb08c7d82c4443c0c09932a
Reviewed-on: https://dart-review.googlesource.com/42105
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Konstantin Shcheglov
2018-02-17 04:27:52 +00:00
committed by commit-bot@chromium.org
parent e82e3df5a8
commit 8fa5567edb
9 changed files with 806 additions and 1 deletions
@@ -729,6 +729,13 @@ public interface AnalysisServer {
*/
public void search_findTopLevelDeclarations(String pattern, FindTopLevelDeclarationsConsumer consumer);
/**
* {@code search.getElementDeclarations}
*
* Return top-level and class member declarations.
*/
public void search_getElementDeclarations(GetElementDeclarationsConsumer consumer);
/**
* {@code search.getTypeHierarchy}
*