[analysis_server] Add a supportsUris client capability for legacy server to switch into URI mode
This adds support for the legacy server to switch to URIs using a client capability. In this mode, all "FilePaths" will be URI strings over the protocol (in both directions). It also allows the server to send LSP notifications (wrapped inside an "lsp.notification" notification, matching how requests/responses work). Notifications are automatically enabled if the client uses any LSP methods or sends the new "supportsUris" capability. Change-Id: I5d2b76e396862129c61de70d57397603c958a02d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349120 Reviewed-by: Jaime Wren <jwren@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
committed by
Commit Queue
parent
33fc944a80
commit
c3d80286fe
@@ -1010,8 +1010,14 @@ public interface AnalysisServer {
|
||||
* requests that can be specified:
|
||||
* - openUrlRequest
|
||||
* - showMessageRequest
|
||||
* @param supportsUris True if the client supports the server sending URIs in place of file paths.
|
||||
* In this mode, the server will use URIs in all protocol fields with the type FilePath.
|
||||
* Returned URIs may be `file://` URIs or custom schemes. The client can fetch the file
|
||||
* contents for URIs with custom schemes (and receive modification events) through the LSP
|
||||
* protocol (see the "lsp" domain). LSP notifications are automatically enabled when the
|
||||
* client sets this capability.
|
||||
*/
|
||||
public void server_setClientCapabilities(List<String> requests);
|
||||
public void server_setClientCapabilities(List<String> requests, boolean supportsUris);
|
||||
|
||||
/**
|
||||
* {@code server.setSubscriptions}
|
||||
|
||||
Reference in New Issue
Block a user