Add signature information to spec and add basic implementation for functions

Bug: https://github.com/dart-lang/sdk/issues/27034
Change-Id: I8d3f1a9c9a824b4b80f9cfa0370a439fa897b226
Reviewed-on: https://dart-review.googlesource.com/64689
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Danny Tuppeny
2018-07-25 07:16:52 +00:00
committed by commit-bot@chromium.org
parent 80f851a711
commit ebb033cb72
20 changed files with 1374 additions and 2 deletions
@@ -141,6 +141,28 @@ public interface AnalysisServer {
*/
public void analysis_getReachableSources(String file, GetReachableSourcesConsumer consumer);
/**
* {@code analysis.getSignature}
*
* Return the signature information associated with the given location in the given file. If the
* signature information for the given file has not yet been computed, or the most recently
* computed signature information for the given file is out of date, then the response for this
* request will be delayed until it has been computed. If the content of the file changes after
* this request was received but before a response could be sent, then an error of type
* CONTENT_MODIFIED will be generated. If a request is made for a file which does not exist, or
* which is not currently subject to analysis (e.g. because it is not associated with any analysis
* root specified to analysis.setAnalysisRoots), an error of type GET_SIGNATURE_INVALID_FILE will
* be generated. If the location given is not inside the argument list for a function (including
* method and constructor) invocation, then an error of type GET_SIGNATURE_INVALID_OFFSET will be
* generated. If the location is inside an argument list but the function is not defined or cannot
* be determined (such as a method invocation where the target has type 'dynamic') then an error of
* type GET_SIGNATURE_UNKNOWN_FUNCTION will be generated.
*
* @param file The file in which signature information is being requested.
* @param offset The location for which signature information is being requested.
*/
public void analysis_getSignature(String file, int offset, GetSignatureConsumer consumer);
/**
* {@code analysis.reanalyze}
*