Commit Graph

4991 Commits

Author SHA1 Message Date
Konstantin Shcheglov 61de22db59 Test for enum constants with isNotImportedFeature, simplify it.
Change-Id: I1e00cd7291a4e018d1fc4820862c7e4c9d84be15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229325
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-22 00:11:00 +00:00
Konstantin Shcheglov 8781ab0151 Update CompletionWithSuggestionsTest for better alignment with the new protocol.
A few tests added, mostly removing CompletionSuggestionKind.INVOCATION
because it is set just for any available declaration by the completion
driver, but this is not what we use for local elements and the new
protocol.

Change-Id: I87da134fd94da75005a98e17e81f43ee56451baf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-20 22:44:08 +00:00
Konstantin Shcheglov c736694ba2 Decrease relevance of not-yet-imported suggestions.
Change-Id: I00f309bee05f79ae400878a000a197ac1732b97a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-20 22:03:57 +00:00
Danny Tuppeny 5bf643b24a [analysis_server] Include static type in LSP hovers
Fixes https://github.com/dart-lang/sdk/issues/48147.
Fixes https://github.com/Dart-Code/Dart-Code/issues/1160.

Change-Id: Icc4bbb5b89a75a14579f72b2c74929e7a05ac688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-19 16:45:15 +00:00
Brian Wilkerson df2e8fedbb Start to refactor ElementMatcher
This is the first of multiple smaller CLs to refactor `ElementMatcher`.

I was starting to fix a bug and realized that the current implementation
allows the number of components to be out of sync with the element kind.
The primary goal is to prevent that by eventually merging the methods
`_componentsForNode` and `_kindsForNode` into a single method
(`buildMatchersForNode`).

In the process I realized that we can sometimes match either a top-level
declaraation or an instance member from a superclass, and that means
that we need multiple matchers (otherwise I think the number of
components will continue to be out-of-sync with the element kinds).

This CL also includes the failing test that started the whole
investigation into refactoring this class.

Change-Id: I0c3a56f29f0f6c6d0cad6ac80145b26201931518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228722
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-18 23:39:27 +00:00
Danny Tuppeny 08c42b3178 [analysis_server] Fix some minor LSP codegen issues
Change-Id: Ie6171416cca75ec623d600ddea2e1efefd8156ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228645
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-18 17:35:05 +00:00
Danny Tuppeny f0475f6015 [analysis_server] Add LSP semantic token modifier for instance fields/methods
Fixes https://github.com/Dart-Code/Dart-Code/issues/3778.

Change-Id: I112ebf727925e2b576e91e719489ca7502e55058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-18 16:58:25 +00:00
Danny Tuppeny 92da2376bc [analysis_server] Handle override completion before getters
Fixes https://github.com/Dart-Code/Dart-Code/issues/3784.

Change-Id: I422f7758f0ae713a37c4b15672828ada67ce9d65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-18 16:16:16 +00:00
Konstantin Shcheglov a8c63a8773 Semantic highlighting for super-formal parameters.
Change-Id: Ib3a663c9bec7909451c082bcc8943df08339a35f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-17 00:11:24 +00:00
Konstantin Shcheglov e8098caeab Field formal parameter identifier is a declaration.
Change-Id: I70bdf7af8f2663a056b8b9be65f5ea23a105d2f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-15 20:37:53 +00:00
Danny Tuppeny 650b9627b7 [analysis_server] Rebuild analysis contexts if changes occur between creation and watchers being ready
See https://github.com/Dart-Code/Dart-Code/issues/3438.

Change-Id: I3ca038d8c878b118a465b6f230c62912d63990eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222763
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-15 00:18:41 +00:00
Danny Tuppeny 9abb0d17c8 [analysis_server] Use existing line/col information in preference to LineInfos for LSP diagnostic mapping
See https://github.com/dart-lang/sdk/issues/48092.

Change-Id: Ifdacf33b30c19859aa33be83300329454637ba5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-14 19:26:31 +00:00
Konstantin Shcheglov 6e30e5a7f6 Add 'Extract local variable' fix for UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE.
Bug: https://github.com/dart-lang/sdk/issues/47588
Change-Id: Ice823f239b3b152d9583cecb143ea78a62361539
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227900
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-13 01:03:22 +00:00
Konstantin Shcheglov 2170c061b0 Add Element.libraryUri and CompletionSuggestion.isNotImported
Remove libraryUrisToImport and libraryUriToImportIndex.

Change-Id: Iafe27d6fb0c5ce0c623567a0384a4579274b151f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227580
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-11 19:53:14 +00:00
Konstantin Shcheglov 6041987d33 Index, search, rename for super-formal parameters.
Change-Id: Ic220a9011914a54a9b35e667edbe90af4257b860
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226803
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-07 18:18:56 +00:00
Konstantin Shcheglov 794a42074d Code completion for super-formal parameters.
Change-Id: I52b0786f7db8e8ec0181b5e4d7eb352b157856b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226606
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-06 19:46:15 +00:00
Konstantin Shcheglov 3adbfcf6a5 Suggest SUPER if Feature.super_parameters is enabled.
Change-Id: I9d6393a412e5f5016359c89cf85fd910b0ac9357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-06 19:07:55 +00:00
Jaime Wren c548470d26 Dart Analysis Server change to the code completion getSuggestions2 protocol, adding completionMode and invocationCount.
Change-Id: I6095cda72943a52de211cf758fbf45fe98d6f0d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2022-01-05 21:15:50 +00:00
Konstantin Shcheglov aeb50d4e6f Make CompletionSuggestionKind a required parameter.
Change-Id: Icd69f9d2853b5acfe8dbf9a5f75ba5437a881bc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226562
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-05 20:19:04 +00:00
Brian Wilkerson f795340952 Add required keyword when fields are non-nullable
Fixes https://github.com/dart-lang/sdk/issues/48021

Change-Id: I75062fba435d56beaea26b93178d24030a98fb32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226482
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-01-05 18:08:46 +00:00
Konstantin Shcheglov cd13938e5e Use CompletionSuggestionKind.IDENTIFIER for properties and accessors.
Change-Id: Ib40bc5a73b551aee98b3a783513909727cd1e9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226486
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-05 17:21:54 +00:00
Brian Wilkerson ccc1656eb0 Improve the message when the required keyword needs to replace the required annotation
Fixes https://github.com/dart-lang/sdk/issues/46841

Change-Id: If318064a901f3cf1cbcf117ad392d72a9cf004fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-05 16:38:25 +00:00
Konstantin Shcheglov 7dd8732825 Use CompletionSuggestionKind.IDENTIFIER for local variables and typedefs.
Change-Id: I1638d15a81a6a43ee1319e1d7227323f19efda53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-04 20:57:42 +00:00
Parker Lougheed 57fdc16b7b Enable prefer_final_parameters quick fix for default parameters.
Fixes #47912

Bug: 47912
Change-Id: Ic2e2802ee89d6f78750efef862dcaa74083a9d33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225840
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-04 19:23:51 +00:00
Konstantin Shcheglov ad773d003b Suggest classes with CompletionSuggestionKind.IDENTIFIER
Change-Id: I99a4eb7d4ca6d58c779390243a0d2caa6b509183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-04 18:10:11 +00:00
Konstantin Shcheglov 0870e9f38c When run out of budget during not-yet-imported, mark incomplete.
Change-Id: Ic03bf7f20301f6790c3041b51cd4ef01208d840f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-12-29 22:27:37 +00:00
Brian Wilkerson 6e27367656 Refactor ElementDescriptor to make enhancements easier
Just moved some code into separate methods so that the one method doesn't
become unreadable.

Change-Id: I48ffa0f53ae12b0cbf0d379db6ee03ad4d458704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-23 23:15:52 +00:00
Brian Wilkerson 3bcae89fcc Use the unique names of lint codes in FixProcessor
Some lint rules produce more than one lint code and sometimes the fixes
that should be associated with those codes is different. This change
will allow us to use the unique names of those codes to produce the
right fix.

Change-Id: Ib6fc69decb664c1224e33e2a78b28ce91594d826
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225582
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-23 20:40:33 +00:00
Brian Wilkerson eaef692c3f Add quick fixes for invalid return types for generator functions
Change-Id: I23a3befd37946c02aadc8c0ebdf75e60cf6767c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225426
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-23 17:36:42 +00:00
Brian Wilkerson 7b7079f519 Allow authors to specify that a member is static
This information isn't currently being used, but the intention is to not
apply a transform for a static element if the reference to the element
isn't qualified by the name of the container (because outside the
container all references to a static member must be qualifed).

Change-Id: I9e316c32287e6cf3dcdfd911296bc3948f1749e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-12-23 00:11:32 +00:00
Sam Rawlins b16b0322b9 Reland "analyzer: Report missing return for nullable return types"
This is a reland of 93bcdf0329

Original change's description:
> analyzer: Report missing return for nullable return types
>
> This is implemented as a new HintCode, but it could be a new Warning, if
> we'd like to stop adding new Hints.
>
> There is also a dartfix available in this change.
>
> Fixes https://github.com/dart-lang/sdk/issues/46656
>
> Change-Id: I8e93e576d2bd09a8ff02d52c12bbb9ec6adff9c2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220803
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

Change-Id: I369b2dc38db0dc278f50b55aab67da53a5a63a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-22 18:46:14 +00:00
Alexander Thomas 3b5d06e449 Revert "analyzer: Report missing return for nullable return types"
This reverts commit 93bcdf0329.

Reason for revert: Broke google3 rolls.

Original change's description:
> analyzer: Report missing return for nullable return types
>
> This is implemented as a new HintCode, but it could be a new Warning, if
> we'd like to stop adding new Hints.
>
> There is also a dartfix available in this change.
>
> Fixes https://github.com/dart-lang/sdk/issues/46656
>
> Change-Id: I8e93e576d2bd09a8ff02d52c12bbb9ec6adff9c2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220803
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com

Change-Id: I122be4cb1d07f7f95334d2d5cbac1de4bd597d15
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224950
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-12-22 08:38:52 +00:00
Konstantin Shcheglov 8d8da75060 Stop using package:intl, but keep in DEPS.
Initial: https://dart-review.googlesource.com/c/sdk/+/224660
Reverted: https://dart-review.googlesource.com/c/sdk/+/225260
Change-Id: I66ef3126997c4f564e4181bbe185a1f64abf43e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225324
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-22 01:17:04 +00:00
Konstantin Shcheglov 73cfe523e0 Revert "Stop using package:intl, remove it from DEPS."
This reverts commit b0d7c56e84.

Reason for revert: breaks Golem, we need these benchmarks.

Original change's description:
> Stop using package:intl, remove it from DEPS.
>
> Change-Id: I7a6c036f7cd2c5ac64b0ab5a8b87bed1b9f34034
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224660
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com

Change-Id: I39d4a2c773063da4dfa75404b64987f85dbcf764
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-21 19:08:24 +00:00
Sam Rawlins 93bcdf0329 analyzer: Report missing return for nullable return types
This is implemented as a new HintCode, but it could be a new Warning, if
we'd like to stop adding new Hints.

There is also a dartfix available in this change.

Fixes https://github.com/dart-lang/sdk/issues/46656

Change-Id: I8e93e576d2bd09a8ff02d52c12bbb9ec6adff9c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-21 18:22:03 +00:00
Danny Tuppeny d512444600 [analysis_server] Fix FILE_NOT_ANALYZED error in completion handler
Change-Id: I18af43f82fb72b013d7dda547d5e0ca528f7558e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-21 17:32:22 +00:00
Konstantin Shcheglov b0d7c56e84 Stop using package:intl, remove it from DEPS.
Change-Id: I7a6c036f7cd2c5ac64b0ab5a8b87bed1b9f34034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224660
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-21 17:19:53 +00:00
Danny Tuppeny 8e407058db [analysis_server] Include required named parameters in generated super constructor calls
Fixes https://github.com/Dart-Code/Dart-Code/issues/3734.

Change-Id: I5dcae267b4989a5244c0704a4ddedba5409b2ce6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-21 17:01:53 +00:00
Sam Rawlins f596d23dc6 Add strict-casts to YAML completion
Bug: https://github.com/dart-lang/sdk/issues/47902
Change-Id: Iaabe459d88ed50640d7b28578bbfe3f22cf36c17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225048
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-20 22:35:13 +00:00
Konstantin Shcheglov 36c051687c Sort extension members.
Change-Id: I61b746f648573f27273135675364f0bcc257d51f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-20 20:40:32 +00:00
Konstantin Shcheglov 3c75efe2bf Stop using astFactory outside analyzer.
Change-Id: I482e1448205f5e4c111857c4caea3c92762bf91d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224880
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-20 19:33:43 +00:00
Konstantin Shcheglov 5738ab2eb6 Sort extension members.
Change-Id: I7538ea08fe414c3fc6ad69bafb4e665214003d30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224960
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-20 18:35:03 +00:00
Konstantin Shcheglov 333192e8ff Share implementation for instantiating ExtensionElement(s) between analyzer and server.
Change-Id: I524f55a0ba6a4eb045a479ad3b53a314f3e1bf16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223741
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-16 17:41:18 +00:00
Danny Tuppeny 295aea1eda [analysis_server] Don't use Dart analysis driver to obtain LineInfos for non-Dart files
Change-Id: I80eead30caecf855385b5cc6c2cd7995de8a9349
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-12-16 16:42:49 +00:00
Keerti Parthasarathy 498d976e1e Implement signature help for cider.
Change-Id: I4b10d4a2a61d3c1fc0bcec652694b7a1b7d0393d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2021-12-13 18:02:18 +00:00
Konstantin Shcheglov f25b9a0601 Tweaks for IMPORT_LIBRARY_PREFIX.
Change-Id: I8a91de92a41a9ed33ea74c53c6a77eb4c36901af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:38:27 +00:00
Konstantin Shcheglov a11017b30d Share implementation for choosing extensions between analyzer and analysis server.
Change-Id: Ie73b74f1c1af00b85402a8dce43442dff4bdc758
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:37:55 +00:00
Konstantin Shcheglov 30ea5d1167 Return variable to either getter or setter.
Change-Id: I412b1747f95505c37812a4f72f5f1e0fe6fff81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-13 16:29:53 +00:00
Michal Terepeta 5185680657 [analysis_server] Fix a problem with a cast when running in sound mode
Change-Id: I90c2a319cacc856b807b807d675099163261f7ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-12-13 16:03:03 +00:00
Konstantin Shcheglov 979f3ea79e Use LibraryElement(s) to find extensions for 'Import Library' quick fix.
So, we don't need ExtensionCache anymore.

This fixes the issue with importing a library from lib/src sometimes.

Bug: https://github.com/dart-lang/sdk/issues/47842
Change-Id: I9a28fb2e1e14ab96a58c3ef72daa87562f1bccd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-12 17:39:22 +00:00