Konstantin Shcheglov
d236dca9d9
Add 'offset' to 'getSuggestionDetails'.
...
We need it to know if names in the syntactic scope will shadow
the requested name if unprefixed import is used.
R=brianwilkerson@google.com
Change-Id: I1fd28add9241b27795160c4705a80e0f8aa6c647
Reviewed-on: https://dart-review.googlesource.com/c/92022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-05 16:49:55 +00:00
lambdabaa
d4b8e0696d
Add the capability in analysis server protocol for clients to express
...
interest in receiving not yet imported code completions from specific
packages and libraries.
The design of this interaction aims to avoid forcing analysis server
to send every public symbol from dependent packages at every completion.
Instead, clients express interest in certain packages and/or libraries
and analysis server will notify with the entire set of symbols for
each of them only once. Then it is the client's responsibility to save
these pre-computed completions in memory, and analysis server can
instruct the client on how to union them with the base set of completion
suggestions at code completion time.
Bug: https://github.com/dart-lang/sdk/issues/35680
Change-Id: I42c6fddc5d8daa2b546daa81456c0992e3ef547d
Reviewed-on: https://dart-review.googlesource.com/c/90125
Commit-Queue: Ari Aye <ariaye@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-31 19:56:18 +00:00
danrubel
db44a727e5
Extend the edit.dartfix protocol
...
This CL extends the dartfix protocol to allow specifying which
fixes should be applied. In summary:
* includedFixes - list of fix names to be applied
* includeRequiredFixes - bool indicating required fixes should be applied
* excludedFixes - list of fix names that should not be applied
Given that the client can specify the fixes to be included/excluded,
then the dartfix cmdline help text should include the list of known fixes.
Rather than hard code this in the dartfix client, a new edit.getDartfix
request has been added to return the list of known fixes.
Change-Id: I319f6f405a5d29757bf28b70b778a449f901bbef
Reviewed-on: https://dart-review.googlesource.com/c/91700
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-31 01:53:32 +00:00
lambdabaa
3e8d87b59d
Include request and response subscription methods to the AnalysisServer interface.
...
Previously in the downstream intellij-plugins repo we added the ResponseListener methods
https://github.com/JetBrains/intellij-plugins/commit/d6a6512b6ea0f1faee3cebd6c05271bed9369b99 .
Mirroring them upstream in the code generation tool will ensure that the
two interface versions do not diverge. Additionally, we'd like the
ability to correlate requests and responses to do things like measuring
roundtrip times. Adding symmetric request subscription hooks to the API
will allow us to accomplish that.
R=scheglov@google.com
Change-Id: Ia940ff014ab06db7aa9335a904c0003dc1316c5a
Reviewed-on: https://dart-review.googlesource.com/c/86583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Ari Aye <ariaye@google.com >
2018-12-07 19:35:17 +00:00
Paul Berry
a84863253c
Re-apply "Add AnalysisDriver.resetUriResolution() and use it for analysis.reanalyze request."
...
Original change's description:
> Add AnalysisDriver.resetUriResolution() and use it for analysis.reanalyze request.
>
> This CL changes "analysis.reanalyze" API. We decided to repurpose it. It was not
> used for some time now in IntelliJ, and AFAIK has never been used in VS Code.
>
> R=brianwilkerson@google.com , paulberry@google.com
>
> Change-Id: I7510b0189197c9f3f848b0fc59a7b2bd22889ac7
> Reviewed-on: https://dart-review.googlesource.com/c/85523
> Reviewed-by: Paul Berry <paulberry@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Change-Id: I828c9a77f1e28d44c00bfcf39527514e39cccc42
Reviewed-on: https://dart-review.googlesource.com/c/86221
Commit-Queue: Paul Berry <paulberry@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-12-06 23:14:28 +00:00
Brian Wilkerson
fade5f33f0
Regenerate code based on the server spec after updates to the generator
...
Change-Id: I3643bf8fb3732e3a664ae2bfdccc554fe4621a06
Reviewed-on: https://dart-review.googlesource.com/c/80262
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-16 16:47:59 +00:00
Brian Wilkerson
e90f1f21b8
Remove unused response codes and deprecate an unimplemented request
...
Change-Id: I7a07182ce8b7e7636f20bd4c661e94dd3dff985c
Reviewed-on: https://dart-review.googlesource.com/77480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-01 20:19:59 +00:00
Dan Rubel
edddc0ba58
Generate source changes for converting class to mixin
...
This uses the AssistProcessor to generate the source changes
and pass them to the client. In a subsequent CL, the client
will apply those changes instead of displaying them.
Additionally, this CL addresses comments in
* https://dart-review.googlesource.com/c/sdk/+/76760
* https://dart-review.googlesource.com/c/sdk/+/76520
Change-Id: I1e9cb4e079ec79a06db4c4d04a062c71107c0f21
Reviewed-on: https://dart-review.googlesource.com/77020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-09-27 19:32:20 +00:00
danrubel
629d76eb46
Simple dartfix that suggests class to be converted to mixins
...
... and update protocol spec errors generated by edit.dartfix
Change-Id: I3708eb9ffa40f91ff9bf172d20d75346f481e4d8
Reviewed-on: https://dart-review.googlesource.com/76760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-09-27 15:44:45 +00:00
Dan Rubel
c624f8b0a9
First cut dartfix protocol
...
and address comments in https://dart-review.googlesource.com/c/sdk/+/76320
Change-Id: I5c7ab40810d4116b1d36de90b7234d0a932bae82
Reviewed-on: https://dart-review.googlesource.com/76400
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-25 16:56:48 +00:00
Danny Tuppeny
fe8052428b
Remove CONTENT_MODIFIED from spec/test for getSignature
...
Change-Id: I5d071df8dd02052cff1ba9b414cec62ab34f6bf6
Reviewed-on: https://dart-review.googlesource.com/67342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-07-30 15:00:38 +00:00
Danny Tuppeny
ebb033cb72
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 >
2018-07-25 07:16:52 +00:00
Konstantin Shcheglov
e3966fcfb9
Protocol for runtime completion.
...
This protocol will be used to support "Evaluate Expression" and "Watch"
window features in IDEs.
Change-Id: Ibde1e88507a66d8c487836a227dfeb13ffd77d9d
Reviewed-on: https://dart-review.googlesource.com/54629
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Jacob Richman <jacobr@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-05-11 22:23:42 +00:00
Konstantin Shcheglov
6e25b9b2d3
Add flutter.getChangeAddForDesignTimeConstructor to API.
...
R=brianwilkerson@google.com
Change-Id: I91e40c447d32e603026de337ec2d36983174a8cd
Reviewed-on: https://dart-review.googlesource.com/49826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-04-06 02:40:00 +00:00
Konstantin Shcheglov
eea08cfabe
Add optional 'file' for getElementDeclarations.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/32461
Change-Id: I0fa5ab2165e24f5b17ecc20ad8f97471389c8b8f
Reviewed-on: https://dart-review.googlesource.com/45761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-03-08 19:10:47 +00:00
Konstantin Shcheglov
c3330ba080
Add 'pattern' and 'maxResults' to getElementDeclarations() request.
...
R=brianwilkerson@google.com
Change-Id: I2094fa106cbdd7bc4eff9015d94b34517b3d50a5
Reviewed-on: https://dart-review.googlesource.com/42180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-26 18:46:27 +00:00
Konstantin Shcheglov
8fa5567edb
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 >
2018-02-17 04:27:52 +00:00
Konstantin Shcheglov
8fbcf977e5
Replace license in generated files.
...
R=devoncarew@google.com
Change-Id: I7511c8da329eba760698a48abc0f8db16038b9ea
Reviewed-on: https://dart-review.googlesource.com/37127
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-01-27 03:18:18 +00:00
Konstantin Shcheglov
402af4db46
Add a new experimental 'flutter' domain and move FLUTTER_OUTLINE there.
...
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I8f829f10a630e38c5a3f1638d077e37832a08daa
Reviewed-on: https://dart-review.googlesource.com/36320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-01-23 00:57:55 +00:00
Brian Wilkerson
8c8969db4c
Forward Kythe requests to plugins and merge in the results
...
R=jwren@google.com
Review-Url: https://codereview.chromium.org/3000823002 .
2017-08-12 08:16:34 -07:00
Jaime Wren
8a426f3d67
Initial experimental Kythe Dart Analysis Server protocol
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2995683002 .
2017-08-09 12:44:59 -07:00
Brian Wilkerson
d9754a58e9
Initial implementation of copy/paste support
...
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2972833002 .
2017-07-05 14:02:07 -07:00
Brian Wilkerson
0ee29eadf1
Run the generator after updates to spec
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2972473002 .
2017-07-02 07:49:05 -07:00
Steve Messick
c26c2774ca
This defines some postfix completion templates for use in the IntelliJ editor.
...
R=brianwilkerson@google.com
To use it, you'll need a version of the Dart plugin with this PR patched in:
https://github.com/JetBrains/intellij-plugins/pull/534
Review-Url: https://codereview.chromium.org/2917943002 .
2017-06-26 09:53:02 -07:00
Devon Carew
511963d715
Add an analytics domain to the analysis server.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2922603002 .
2017-06-02 14:38:53 -07:00
Devon Carew
eb1839b8fd
Minor changes to the generated spec, and display deprecated methods better.
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2800283002 .
2017-04-15 13:43:36 -07:00
Steve Messick
4a2cca3a52
Add getStatementCompletion to the API spec
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2784673003 .
2017-03-30 10:13:21 -07:00
Brian Wilkerson
c416aabed1
Deprecate the analysis.updateOptions request
...
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2719853004 .
2017-02-27 10:37:02 -08:00
Devon Carew
25dfd0fa80
Deprecate execution.setSubscriptions.
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2713513007 .
2017-02-24 11:01:00 -08:00
Devon Carew
9dd2a6d452
Revert "Tweaks to the analyzer_cli."
...
This reverts commit a7ac08d0e7 .
BUG=
Review-Url: https://codereview.chromium.org/2709163005 .
2017-02-23 09:39:25 -08:00
Devon Carew
a7ac08d0e7
Tweaks to the analyzer_cli.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2709013005 .
2017-02-23 09:02:49 -08:00
Devon Carew
7f83d9d173
Add a diagnostic.getServerPort analysis server request.
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2703033002 .
2017-02-19 15:19:40 -08:00
Brian Wilkerson
685e4ff9e1
Revert "Remove unused option in server API"
...
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson
2972bd0d6b
Remove unused option in server API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Dan Rubel
9fe92127e5
update setAnalysisRoots to accept package spec file
...
As part of addressing https://github.com/dartino/atom-dartino/issues/13 ,
this CL updates the setAnalysisRoots API to allow package spec files
in the packageRoots map.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1711353003 .
2016-02-19 10:57:16 -05:00
pq
43f027fc05
Analysis request getReachableSources ( #24893 ).
...
Implements a new request to get reachable sources.
This solves a specific issue for flutter (e.g., inferring execution type by checking the transitive closure of reachabe sources for `dart:flutter`) but can be more generallly useful for other client-side smarts (e.g., "is this a web entry point?" or "is this a test?").
More context here: https://github.com/dart-lang/sdk/issues/24893
R=brianwilkerson@google.com , devoncarew@google.com
Review URL: https://codereview.chromium.org/1491013002 .
2015-12-02 13:26:35 -08:00
pq
6d9cb5e48a
Move diagnostics to diagnostics domain ( #24931 ).
...
Still flagged `experimental` so no docs created.
See: https://github.com/dart-lang/sdk/issues/24931
BUG=24931
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1453433002 .
2015-11-16 14:10:10 -08:00
pq
82e83bb34d
Experimental getDiagnostics request ( #24480 ).
...
* Adds `getDiagnostics` request with *very* provisional diagnostics payload (primary goal here is to plumb this fully through and iterate).
* Updates codegenerator to skip doc generation for experimental APIs.
Additional context here: https://github.com/dart-lang/sdk/issues/24480 .
BUG=24480
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1416093007 .
2015-11-05 15:05:21 -08:00
Konstantin Shcheglov
c0d68a5437
DAS specification changes - spelling and ElementKind.FILE addition.
...
ElementKind.FILE will be used in search.findElementReferences
1. In the 'element' field of responce when a URI is at the given offset.
2. In the only element of the 'path' field of SearchResult(s) for URI references to a URI or a library identifier.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1409333002 .
2015-10-17 10:03:03 -07:00
Konstantin Shcheglov
58f5005cb1
Add the optional 'superOnly' request parameter for 'search.getTypeHierarchy'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1325543006 .
2015-09-03 13:03:01 -07:00
Konstantin Shcheglov
aa30cad380
Proposal for the 'edit.organizeDirectives' request.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23921
Review URL: https://codereview.chromium.org//1258563008 .
2015-08-03 07:59:26 -07:00
Brian Wilkerson
2ffa8de794
Add notification of analyzed files
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1232393005 .
2015-07-13 15:07:33 -07:00
Konstantin Shcheglov
d7c2f4550b
Issue 23640. Implement 'analysis.getNavigation' request.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23640
Review URL: https://codereview.chromium.org//1232683003 .
2015-07-10 15:31:25 -07:00
danrubel
d6580fd9fb
generated analysis server java client code package rename
...
This changes the generated package name to better reflect our new home
from com.google.dart.server.generated.types
to org.dartlang.analysis.server.protocol
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1164683003
2015-06-04 17:29:35 -04:00
Brian Wilkerson
07dd6b7649
Add lineLength parameter to edit.format request (issue 23519)
...
R=jwren@google.com
Review URL: https://codereview.chromium.org//1154303005
2015-06-01 09:39:02 -07:00
paulberry@google.com
de0cb1f374
Create a new home for Java code generated by analysis server.
...
This code used to be generated directly into
editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated,
however now that editor is no longer part of this repository that
doesn't work anymore.
Fixes the test pkg/analysis_server/tool/spec/check_all_test.
R=danrubel@google.com
Review URL: https://codereview.chromium.org//1132673003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45646 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 16:40:04 +00:00