Danny Tuppeny
28e926f0fb
[analyzer]/[analyzer_plugin] Support change descriptions on SourceEdit
...
Previously, we only had descriptions of changes on a SourceChange. In order to support annotated edits over LSP for "Fix All in Workspace" we need to be able to track descriptions on each change within a file so that if we're fixing multiple different lints with a single SourceFileEdit they can be annotated/grouped in the UI.
In order to avoid every fix providing a description, ChangeBuilder has a field that allows recording the current change description and all builders created from it will use that description when creating their changes. This allows the BulkFixProcessor to set the description on behalf of each fix producer ensuring they all get descriptions (which is done in a follow-up CL along with Fix All in Workspace functionality).
Change-Id: Ie1c508056898bd4000a5505cf59a1e6d35d28da0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356160
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-03-08 18:54:05 +00:00
Konstantin Shcheglov
bbc3dcbe30
Extension type. Tests for type hierarchy.
...
Change-Id: Ic0e31bb13efd68a3413429d1ff9110bb9b268e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323432
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-08-30 21:18:25 +00:00
Konstantin Shcheglov
ce7164488a
Extension types. Semantic highlighting.
...
Change-Id: I46cde8151965e209a230df811592f8498e93c218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318161
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-08-04 19:13:43 +00:00
Konstantin Shcheglov
edccf64f54
Fix for highlighting mixin names.
...
Change-Id: Idadb02aa1b86525fde307a5eddc8876f152d1b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-03-24 21:37:57 +00:00
Konstantin Shcheglov
671bb192ab
Remove domain 'kythe' from DAS.
...
Change-Id: I66f0e538dce6eead6ba1c98b9cf0e3d747450130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264895
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-10-21 17:03:29 +00:00
Brian Wilkerson
a3f8672778
Add a highlight kind for record literals
...
I don't think that there are any other highlight kinds we're going to
want to add, but if you can think of any please let me know.
I'll add code to actually associate the kind with record literals in the
next CL.
Change-Id: I15922984d96c2d0c7d97ea3f3832a95a68172968
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256524
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-08-26 21:22:53 +00:00
Devon Carew
cb5b66f694
[analysis_server] minor cleanups to analysis server spec generation
...
Change-Id: I9fd780fb627eaab24731d426e5a0f51b9608f189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249734
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-06-27 17:21:02 +00:00
Devon Carew
057d0baaf9
Add a lightweight parser for the analyzer spec (remove sdk deps on package:html).
...
Change-Id: Ia8776c8aea845a7dde089d5ac9f3dab82e984f4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-06-25 00:34:40 +00:00
Danny Tuppeny
fa8a33f60e
[analysis_server] Set Container() as final tabstop/selection in Flutter snippets
...
Change-Id: I0f1fd31a051440ccc119188cccdb3168c9e58e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245988
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-05-25 18:57:28 +00:00
Konstantin Shcheglov
16fadd69a6
Switch to protocol version 1.33.0, enable new completion protocol.
...
Change-Id: Ib7de4d616cba91bfe3b014199b6aacaa01c9c052
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239322
Reviewed-by: Jaime Wren <jwren@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-03-29 20:53:39 +00:00
Danny Tuppeny
77c650433f
[analysis_server] Add support for empty linked edits
...
Change-Id: I8e3a57732ecb36712e754549333d551bb0a47e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-03-09 16:38:25 +00:00
Danny Tuppeny
70d25c7ce7
[analysis_server] Make docs more explicit about positions in LinkedEditGroups
...
Change-Id: Ifcc8935ac7c72d42fcc0462fd2f6ad3eb8ecd3b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-02-10 19:51:13 +00:00
Konstantin Shcheglov
540c053ca8
Add HighlightRegionType.EXTENSION
...
Change-Id: I375df19b8ee5f6570fcc7d440b9d71b148bcef73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-01-26 16:11:59 +00:00
Konstantin Shcheglov
06f0ecb8e8
Add more HighlightRegionType.xyz_TEAR_OFF
...
Change-Id: I357d621439c68b77545bdd01719310c60684e1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212602
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-07 18:31:03 +00:00
Konstantin Shcheglov
1957af707c
Use CONSTRUCTOR_TEAR_OFF for ConstructorReference highlighting.
...
Change-Id: Iee9731ef6e273ae89bc5328d6941aa8ddd530562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-07 16:08:02 +00:00
Brian Wilkerson
9db372e6f4
Make Location.endLine and Location.endColumn optional fields in the protocol
...
In https://dart-review.googlesource.com/c/sdk/+/191862 we added two new
required fields to `Location`. Unfortunately this was a breaking change
because plugins using an older version of the `analyzer_plugin` produce
location objects without those fields, leading to deserialization failures.
This CL makes those fields optional in order to fix the deserialization
issue.
Unfortunately, the `analyzer_plugin` package was published after the
required fields were added. Making them optional is a breaking change
because the constructor parameters go from being positional to being
named parameters.
We also neglected to update the version number of the protocol as part
of the previous CL. Technically this is also a breaking change for clients
of the analysis server, but given that they had no way to test to see
whether these fields existed they would need to have been written as if
the fields were optional in order to reference them at all, so I think
that from a practical standpoint it isn't a breaking change. That does,
however, raise the question of whether we should increment the version
numbers as part of this CL.
Change-Id: I35fc1f8e950669a3d8dd33cee6b81890261b5c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206942
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-07-15 17:35:55 +00:00
Danny Tuppeny
d3082bcb3e
[analyzer] Add folding regions for parameters
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/1201 .
Change-Id: I2865337861397ae15d2c4515b009fa22c678b5b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-05-24 17:13:35 +00:00
Brian Wilkerson
d00ef8611a
Update the server protocol to support passing back the line and column numbers for the end of a range
...
Change-Id: I8310e4a32cacbe98310c1dbaa3b3563b1ff1a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191862
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-18 19:22:23 +00:00
Danny Tuppeny
78dd7a4bb3
[analyzer] Suggest arg names in front of positionals
...
Fixes https://github.com/dart-lang/sdk/issues/40654 .
Change-Id: I329d8b4af9371e8d61c4044bb003f9c22cd72c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-04 18:21:19 +00:00
Konstantin Shcheglov
5c426d8d43
Add Element.aliasedType to the protocol.
...
R=brianwilkerson@google.com
Change-Id: I95fb2c9d50096f90913c4d6670ce0841095fe6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-27 23:27:21 +00:00
Konstantin Shcheglov
40b9650b67
Add ElementKind.TYPE_ALIAS and HighlightRegionType.TYPE_ALIAS to the protocol.
...
Change-Id: Ia4991d4f657f4bfa5e244d9c3b126e89571b9e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-25 18:42:03 +00:00
Danny Tuppeny
b94adb2bc2
[Analyzer] Add folding regions for comment blocks
...
Change-Id: Iafe70e977065dc68230503349b8ba3abe9b4c0c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179777
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-20 16:23:45 +00:00
Danny Tuppeny
a0cc6c9819
[Analyzer] Add a new CompletionSuggestionKind for Pub package names
...
Change-Id: I73fad5c793249a8ee0e30c1ce198b5adf7ff429a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174128
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-11-27 17:38:16 +00:00
Devon Carew
2f9cb8e81b
Remove support for v1 of analysis highlighting.
...
Change-Id: I65bc645de9565628d82d1ff969616f3e38582275
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171682
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-11-12 18:36:19 +00:00
Danny Tuppeny
5112f526cf
[Analyzer] Add optional support for codeOffset/codeLength on navigation targets
...
Change-Id: Ib328c408d590398d30bd341603781f68f2fd1402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161166
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-02 20:51:27 +00:00
Danny Tuppeny
f0e1f32c87
Add support for folding if/else/elseif blocks
...
Change-Id: I3cbf1f282ee59c577c6ba912e957f838e827fd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-17 19:32:50 +00:00
Brian Wilkerson
17e15ee9a4
Add outline support for extensions
...
Change-Id: I1b7145e899614b3d73d3fc2bfbe3dd7f773d38d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109880
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-07-22 21:12:40 +00:00
Brian Wilkerson
9670b2ccb9
Update the server API to support context messages
...
Change-Id: Ic07ef7d01125ca76f72e8c0e370181ea4f6f7cb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100825
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Jaime Wren <jwren@google.com >
2019-05-01 01:31:44 +00:00
Brian Wilkerson
11a148c85e
Add the ability to associate a URL with a diagnostic
...
Change-Id: I06f694311130a36b1db4b4baf2e7d46d999f07b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97554
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-22 13:32:05 +00:00
Konstantin Shcheglov
266ce73e28
Remove CompletionSuggestion.elementUri, replaced with AvailableSuggestionSet.
...
R=brianwilkerson@google.com
Context: https://github.com/JetBrains/intellij-plugins/pull/633#issuecomment-465725310
Change-Id: I03a1b7e7ec7cc0a5b0797dc960b72ca314a32132
Reviewed-on: https://dart-review.googlesource.com/c/93745
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-20 21:34:18 +00:00
Konstantin Shcheglov
5e2529c82e
Remove 'importUri' from CompletionSuggestion.
...
R=brianwilkerson@google.com
Change-Id: I1c06f7e6d84d5c2dd0eee7fa80f2e4bca3959513
Reviewed-on: https://dart-review.googlesource.com/c/93379
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-20 18:14:45 +00:00
lambdabaa
b767744cfc
Add optional elementUri field to CompletionSuggestion types in analysis server protocol
...
This will enable clients such as IntelliJ to display the package which code
completions are being offered from in addition to the keyword or identifier
that they're already getting from analysis server.
R=brianwilkerson@google.com
Change-Id: I30311451ad56b4eddbe73da20641ee0d14849293
Reviewed-on: https://dart-review.googlesource.com/c/88744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Ari Aye <ariaye@google.com >
2019-01-09 00:13:39 +00:00
Konstantin Shcheglov
0fae13e6bf
Support for mixins in search.getElementDeclarations.
...
R=brianwilkerson@google.com
Change-Id: I88e90159ae28a2585fdbaacca2c4caab15891b83
Reviewed-on: https://dart-review.googlesource.com/72523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-31 20:19:18 +00:00
Danny Tuppeny
3af09b5b26
Add support for invocation + list/map literal folding
...
Bug: https://github.com/Dart-Code/Dart-Code/issues/966
Change-Id: Id85471f095b26349e60e0b10f89b4465d4c9b138
Reviewed-on: https://dart-review.googlesource.com/58740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-06-07 09:05:33 +00:00
Danny Tuppeny
568e977a35
Update FoldingKinds enum, update specs and increase version number
...
Bug: https://github.com/dart-lang/sdk/issues/33033
Change-Id: Ieccfd90ead67a9803744c54db4eec8eea0b0403c
Reviewed-on: https://dart-review.googlesource.com/54920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-05-14 16:48:48 +00:00
Brian Wilkerson
d3295ded48
Remove the SORT_MEMBERS refactoring from the spec
...
Change-Id: Ic8b8135f22d8c3c07d4ded661ac43d2d5105dc3f
Reviewed-on: https://dart-review.googlesource.com/48464
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-27 16:37:44 +00:00
Konstantin Shcheglov
6bd38cc912
Analysis Server API for 'Extract Widget' refactoring.
...
R=brianwilkerson@google.com
Change-Id: Ie6b7c349d304785ab6829770ebd3504c0affe8df
Reviewed-on: https://dart-review.googlesource.com/47943
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-03-22 20:25:29 +00:00
Konstantin Shcheglov
e1909cb52a
Update Outline protocol - change offset/length, add codeOffset/codeLength.
...
R=brianwilkerson@google.com
Change-Id: I4b5c03a21254f7c497adc4c043641b18599c5c39
Reviewed-on: https://dart-review.googlesource.com/45764
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-03-09 01:52:57 +00:00
pq
bea00e5bb3
(Re)-generate Server APIs.
...
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/40101
Change-Id: I6aa8fd474bfa4b5529f1a1f1d664f29f84e56331
Reviewed-on: https://dart-review.googlesource.com/40462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-09 18:53:08 +00:00
pq
a4ecc44c30
Completion protocol API for overrides.
...
Proposed API to allow IDEs to ask a suggestion for a displayText which may differ from the value to insert (the completion).
Also, adds a new OVERRIDE suggestion kind.
See: https://youtrack.jetbrains.com/issue/WEB-31130
Change-Id: Ic0644308d746ac7771bc27bc2ff2789444733af3
Reviewed-on: https://dart-review.googlesource.com/40101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-09 17:57:17 +00:00
Konstantin Shcheglov
ffd67154f7
Add a new optional field - 'id' to SourceChange.
...
R=brianwilkerson@google.com
Change-Id: Ibe85415be35982327593ffd1187ec74b1d037463
Reviewed-on: https://dart-review.googlesource.com/40102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-02-08 20:13:11 +00:00
Devon Carew
47a861ca85
Add two new element types to the protocol.
...
Bug:
Change-Id: I5a60081d7c8500590bbabb9ee6dce74fa611b0a3
Reviewed-on: https://dart-review.googlesource.com/14883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-18 19:02:47 +00:00
Brian Wilkerson
37042bb59b
Add an integration test for kythe support with bug fixes
...
R=jwren@google.com
Review-Url: https://codereview.chromium.org/3006693002 .
2017-08-28 10:07:04 -07:00
Brian Wilkerson
579a032564
Add kythe support to plugins and format the spec files
...
R=jwren@google.com
Review-Url: https://codereview.chromium.org/2994103002 .
2017-08-10 11:24:40 -07:00
Brian Wilkerson
cc7b83f4da
Mark refactoring support for plugins as experimental
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2990573003 .
2017-07-26 07:43:55 -07:00
Brian Wilkerson
8bbf373a5e
Remove the analysus.reanalyze request from the plugin API
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2988743002 .
2017-07-25 12:10:52 -07:00
Brian Wilkerson
4749014b06
Remove an unused request and the associated type
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2964113003 .
2017-06-30 09:44:59 -07:00
Brian Wilkerson
99cc563718
Update the spec to deprecate fileStamp
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2964653002 .
2017-06-30 08:21:47 -07:00
Brian Wilkerson
24996fbfe7
Add support to pass the location of the analysis options file to plugins
...
R=mfairhurst@google.com
Review-Url: https://codereview.chromium.org/2947743002 .
2017-06-20 07:41:03 -07:00
Devon Carew
8df017b670
Re-gen analysis server specs.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2911783002 .
2017-05-27 12:42:17 -07:00