This adds additional "Editor" service method definitions as used by the new DTD sidebar. I moved the Editor service definitions into a new file (because they're now quite large and dtd_common_services seems better as an intro and list of the common specified services).
I also split the existing info about `navigateToCode` into a more terse definition (in the new file) and a general example. I also updated the error example as I believe it was incorrectly wrapped in `result`.
Change-Id: I6136eb550cce0dab86d535db02f9f06ee42892e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378141
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This is a proposal for a standardized service method for IDEs to register for navigating to code. This is intended to replace the `navigate` `ToolEvent` since there isn't a way for an IDE to respond to that notification and verify that the DevTools-IDE interaction was successful.
Change-Id: I92c0ad36b3f0557ffb80b868b466808ef3c3563d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375080
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
This question came up in another change, about whether a client would have hanging requests if the other DTD client providing the service disconnected.
This adds a test to ensure that any pending requests are terminated with an error.
It also tidies up some other tests to give better errors if they fail.
Change-Id: I77e04ee59f757498af090878da542d6ed1d152b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374946
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Removes the port from `startService()` (which as far as I can see is unused) and parses it from `args` instead.
I had to add support for "options" in the argument classes and switched from a bool flag `isFlag` to an enum to be a bit more descriptive (and be easier to support multi-options in future if required).
Fixes https://github.com/dart-lang/sdk/issues/56000
Change-Id: Ib08513139f58e8845a7c2cbbeeea06787dbc2df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371840
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
- devtools server can now take the dtd uri as a parameter on startup
- dtdUri is passed to the server handler so that devtools can request it.
- FileService is implemented inside the Dart Tooling Daemon (dtd_impl)
- Added FileService.setProjectRoots
- Added unit tests and rpc exceptions
- on startup dtd now prints { uri, secret } so that the caller has the secret that allows them to call FileService.setProjectRoots
Fixes: https://github.com/dart-lang/sdk/issues/54790
Change-Id: I7a66aca2f8f06f6a611a46c727a9d5c2485fbe3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346922
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
This change includes the following:
- A new `tooling-daemon` CLI command to launch DTD
- Minor refactoring of package:dtd_impl to better match expected
Dart package structure
- Updated build rules to create dart_tooling_daemon.dart.snapshot
Change-Id: Idd91bc4ce64ce790db5bad323a50d9cf65523dc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344800
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
I neglected to add these while adding pkg/dtd and pkg/dtd_impl.
Adding them now to make sure vm and devtools members have ownership before too many people go on holiday.
Change-Id: I379488255786ff9f4c9b2684a0672e57c5e6aff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342500
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
This will contain the code for running the DTD server.
When this is fully funcitonal VSCode will be responsible for running the, and letting our other tools(i.e. DevTools) know which address it is running at.
Change-Id: Ia4cc9553f000a5e765f604541f4846b107d4d00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338501
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>