Konstantin Shcheglov
52290eba28
Add CompletionSuggestion.libraryUri, keep isNotImported.
...
Change-Id: I1bce246c2d8eaa968a47ae6ba82114592b991a47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-02-04 22:49:10 +00:00
Konstantin Shcheglov
6dd2790b57
Use cached enclosingClassElement for extension completion.
...
This improves time to compute completion metrics from 61 to 48 seconds.
We used to spend 21% of all time in `[Stub] InstanceOf`.
Now 2%, unfortunately it does not show back pointers.
Change-Id: I3c6c62cabfa86bac138d95d4830b605693e086d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230580
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-01-27 23:34:42 +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
47eff41cdb
Issue 48184. Fix suggesting local function returning void in named argument.
...
Bug: https://github.com/dart-lang/sdk/issues/48184
Change-Id: I5f6c8f2443782dec3c75c44cb7baeea8ed8b5e0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-01-20 23:45:57 +00:00
Danny Tuppeny
32b3e18e92
[analysis_server] Insert "required" keyword in created methods/added named parameters
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3770 .
Change-Id: I954b9bbcac72ffc7a7b6e168214971bf1786872a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228564
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-01-20 17:00:37 +00:00
Danny Tuppeny
5455047ed0
[analysis_server] Suppress code completion in comments before dartdocs
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3783 .
Change-Id: I8539d8b525534ad85b42618a6a3e9888fb43c851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-01-19 17:25:36 +00:00
Konstantin Shcheglov
1b447a1335
Navigation support for super-formal parameters.
...
Change-Id: I8070b303ea4d7bce45afe63668f9ec85686dd1b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-01-18 17:53:25 +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
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
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
Jaime Wren
38cbbaa63d
Initial @tool annotation support in the Dart Analysis Server
...
There is still required IntelliJ work to have this work end to end
Change-Id: I44cea5baee24e0b1c641d329b3d19eb7733f2003
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jaime Wren <jwren@google.com >
2021-12-20 20:24:43 +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
e78f715541
Extract ClosureContributor from ArgListContributor.
...
Changes to ArgListContributorTest include adding one test and reordering.
Change-Id: I75eb1c6948044c9846b30f80874a4557d4d78925
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222600
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-12-10 07:00:39 +00:00
Konstantin Shcheglov
15c5e38337
Support RedirectingConstructorInvocation in ArgListContributor.
...
Change-Id: I969c536b5a4089bfb13fdb5f6cd4dae2e486cc4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-12-10 01:53:52 +00:00
Danny Tuppeny
5064c19938
[analysis_server] Throw if ChangeBuilder.addDartFileEdit is used in a way that would lose edits
...
Change-Id: Ifee71a7b471512ba74bfbc4be5ce26d86a67da1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-12-09 18:55:34 +00:00
Sam Rawlins
fe3ae428a3
analyzer_plugin: Add missing return in nullably-typed function
...
Bug: https://github.com/dart-lang/sdk/issues/46656
Change-Id: I8a37d4b08ea678b7d021f173448d6770b04f1d34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-12-08 04:21:20 +00:00
Danny Tuppeny
3dbd06bdfc
[analysis_server] Use relative imports for completion imports when prefer_relative_imports lint is enabled
...
Change-Id: Ib72066102db1883a21cf7a42e18a81efcfb47c54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-11-16 20:05:51 +00:00
Brian Wilkerson
7bc9ca5ee9
Allow import fixes to run after other fixes
...
Change-Id: I820332ac17b7e2d9d981271ce2c6f544dc2b2080
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-11-15 19:20:01 +00:00
Siva Annamalai
8b14aba413
Revert "Reland Support overlapping deletions in quick fixes"
...
This reverts commit c1d4af3049 .
Reason for revert: Broke Flutter, see https://github.com/flutter/flutter/issues/93206 for more details.
Original change's description:
> Reland Support overlapping deletions in quick fixes
>
> This relands both
> - https://dart-review.googlesource.com/c/sdk/+/217280 , and
> - https://dart-review.googlesource.com/c/sdk/+/217287
>
> Change-Id: Icd32df8e5bdc64514e4383f2e5625c0b093f862c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219285
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I282a7ea79777ca257333bb3c4b97d780695df902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219820
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2021-11-09 18:05:03 +00:00
Konstantin Shcheglov
f7d5061350
Create CompletionTarget with AstNode entry point.
...
When we resolve a file partially, there is no fully resolved
CompilationUnit. So, anything we create for completion should be
based on element models and a resolved, or unresolved AstNode.
In a following CL I will make it possible to create instances of
DartCompletionRequest based on such element models and node.
Change-Id: Ief7e376588bb63f4d898e33299a9fd2014c88843
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219748
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-11-09 02:49:23 +00:00
Konstantin Shcheglov
c0aeb94e6b
Remove CompletionTarget.unit, parts of OpType.
...
Change-Id: Ibf39abd01c7fa743944064e288588e66daf6f881
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-11-08 20:02:42 +00:00
Danny Tuppeny
00ca3283c0
[analysis_server] Correct sorting of fixes, inverting priorities to maintain order
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3646 .
Change-Id: I9784bbda8aa62d3506810fc7768d58a4cd2bf064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219706
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-11-08 19:55:02 +00:00
Brian Wilkerson
c1d4af3049
Reland Support overlapping deletions in quick fixes
...
This relands both
- https://dart-review.googlesource.com/c/sdk/+/217280 , and
- https://dart-review.googlesource.com/c/sdk/+/217287
Change-Id: Icd32df8e5bdc64514e4383f2e5625c0b093f862c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219285
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-11-05 14:20:09 +00:00
Konstantin Shcheglov
4f495fa6bd
Use CompletionTarget.dotTarget in TypeMemberContributor.
...
Change-Id: Ie39d6030f1b52f42c5ae579b43ef65f88ef71914
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218667
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-10-29 20:17:30 +00:00
Konstantin Shcheglov
f706631f63
Move dotTarget to CompletionTarget.
...
Change-Id: Idaf40cdedcb90fd68f00fd3ab994ac53c7fe1ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218665
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-10-29 18:34:15 +00:00
Konstantin Shcheglov
9e5d26a31a
Fix cast to Expression when completion in a comment token.
...
By some reason we started getting many of these recently,
showing in crash log.
Change-Id: I6373e8d4b56a32c7d66cc835f1ff6aefb4cd186c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-10-29 17:33:19 +00:00
Konstantin Shcheglov
e916841bcc
Deprecations and renames for getXyz() in AnalysisDriver.
...
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/405055453/OCL:405055453:BASE:405057194:1634949541100:f811db8d/targets
Change-Id: I8f7f036003650611760523dd315ba89724a29b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217805
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-10-23 17:15:33 +00:00
Devon Carew
e20ffbb3ce
Revert "Support overlapping deletions in quick fixes"
...
This reverts commit ff34b81174 .
Reason for revert: This causes a failing test when trying to roll the engine into flutter/flutter. See https://github.com/flutter/flutter/issues/92181 for more context.
Original change's description:
> Support overlapping deletions in quick fixes
>
> I believe that the tests cover the added behavior (and some existing
> behavior), but they aren't complete. I'll add more tests over time, but
> for now the test coverage is strictly better than it used to be.
>
> Change-Id: I8dd228cb2b3c477c28e6d20c6da4a549a30d1afb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217280
> Reviewed-by: Phil Quitslund <pquitslund@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ib50418544a2fd30c255ffc118b42c45aded3ae1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217760
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2021-10-22 00:12:46 +00:00
Konstantin Shcheglov
4487759dd2
Document new DAS completion APIs.
...
Change-Id: I2ff1f2c494033a62fead7d828d5d875b55eda203
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215643
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-10-21 18:21:35 +00:00
Brian Wilkerson
ff34b81174
Support overlapping deletions in quick fixes
...
I believe that the tests cover the added behavior (and some existing
behavior), but they aren't complete. I'll add more tests over time, but
for now the test coverage is strictly better than it used to be.
Change-Id: I8dd228cb2b3c477c28e6d20c6da4a549a30d1afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217280
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-10-19 18:36:23 +00:00
Ahmed Ashour
dae0de9755
ChangeBuilder to always write parameters' types for Function
...
Fixes https://github.com/dart-lang/sdk/issues/29050
Change-Id: I89c0f2dab6d8bcd5af865c6e75022100df1596c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-09-29 17:02:21 +00:00
Konstantin Shcheglov
9826867fd0
Remove the macro prototype.
...
Our understanding improved, and out approach changed significantly.
So, this existing implementation is different enough to be not
very useful anymore. And it gets in my way while doing other changes.
Change-Id: If31c20a0a6f86c01a58d16390a989f77962396b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-27 23:07:53 +00:00
Kevin Moore
b67a67e03c
pkg:analy* - don't call .hashCode within Object.hash functions
...
Follow-up to https://github.com/dart-lang/sdk/commit/cb7c932f7bed440ead0279845c2e8e578cbdea41
Change-Id: Ie00e7759880bfc80f7b04a79979325d26607f148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214581
Auto-Submit: Kevin Moore <kevmoo@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-09-26 21:49:04 +00:00
Konstantin Shcheglov
b553298024
Deprecated TypeName, use NamedType instead.
...
Change-Id: Ic7c2bef44277db3d4b3de495fbf9fbadf15f3db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-23 06:08:34 +00:00
Konstantin Shcheglov
e1b5db7478
Deprecate getters that return TypeName, replace with returning NamedType.
...
Change-Id: I13764db3da27d5eabe972aab32cdf587a7de53e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-09-22 21:01:58 +00:00
Konstantin Shcheglov
1c125b4868
Deprecate AstVisitor.visitTypeName(), add visitNamedType().
...
Change-Id: I736a568068c2acfdc7074bb16b11fd38b656a13a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214135
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-22 19:15:54 +00:00
Kevin Moore
cb7c932f7b
analyzer: use Object.hash functions, deprecate JenkinsSmiHash
...
Also bump min SDK for pkg:analyzer
Towards https://github.com/dart-lang/sdk/issues/27698
Change-Id: Ic32c839c02f18afd99fdb98eb382540aae7da88a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214126
Auto-Submit: Kevin Moore <kevmoo@google.com >
Commit-Queue: Kevin Moore <kevmoo@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-09-22 19:11:24 +00:00
Konstantin Shcheglov
dfd7d7b37a
Deprecate NodeList<TypeName> getters and replace with NodeList<NamedType>.
...
Change-Id: I6a772a7bca75e9c2ab4b3612d51c04ea6114ed6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214130
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-09-22 16:25:56 +00:00
Konstantin Shcheglov
b8877d1f5a
Replace TypeName with NamedType in analyzer_plugin/, where possible.
...
Change-Id: I979e904fc54fef6dfc42cb999ac72fefb669f462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-22 01:26:21 +00:00
Ahmed Ashour
a24d875ff6
ChangeBuilder.writeType to handle nullability of Function
...
Bug: 29050
Change-Id: I2ec8e0a49c626f75ebd1d21adad5d0d63123c54f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-09-17 22:26:09 +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
Konstantin Shcheglov
f67d4b368c
Update navigation notification to support ConstructorReference.
...
Change-Id: I815941304f8dd131998f5ae527f21077ce5324df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-03 18:53:57 +00:00
Konstantin Shcheglov
78fd1fb758
Format analysis_server/ and analyzer_plugin/.
...
R=brianwilkerson@google.com
Change-Id: Ib3140b9a7e1dbefd7106cc471574d210b359e7bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-09-01 21:08:56 +00:00
Brian Wilkerson
df964d1c1a
Fix a bug in OpType that caused it to compute the wrong completion location
...
Looking atanges to the tests I wasn't sure whether this was a good change
to make, but the metrics improve for both locations as a result:
CompilationUnit_declaration 64.159 | 58.277 -5.882
CompilationUnit_directive Infinity | 88.826 -Infinity
The tests mostly cover the case where insertion is between the two, and in
those cases we might want a blend of the two because it's impossible to know
whether the user is adding a directive after the last directive or adding
a declarartion before the first declaration. But that's a topic for a
different CL.
Change-Id: I2b82209ab77796d0bc8b9fc4a7c0ab91293c3746
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211083
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-08-25 00:45:35 +00:00
Ahmed Ashour
86898c2ee6
DartEditBuilder to have canWriteType()
...
Bug: 46911
Change-Id: Icf8cdb3af6f2c34fe2eff75f1aeb1dac4aa8aac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-08-21 18:51:36 +00:00
Konstantin Shcheglov
fd2a3cdc3a
Support navigation to macro-generated elements.
...
We use previously added `CompilationUnitElementImpl.macroGeneratedContent`
to access the current combined content.
In order to make this work with current IntelliJ plugin, without
adding new protocols, we store the generated code into a new file,
and locations for macro-generated elements are in this file.
Locations for elements that are not macro-generated are still
in the source file.
We use `ElementLocationProvider` to separate writing to the file
system, and do this only in DAS.
Change-Id: Ib156c67b0bf1f3474eb06584e76aa532abd597d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-08-17 16:14:02 +00:00
Danny Tuppeny
0de7e86c2a
[analysis_server] User outer-most matching node in getNavigation to fix constructor navigation
...
Fixes https://github.com/dart-lang/sdk/issues/46725 .
Change-Id: Ib4f3ec5fe776ad694a7ce7019591a73aab2c4257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208647
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-08-05 15:59:50 +00:00
Brian Wilkerson
7bc076c9e0
Fix a bug in data-driven fixes that caused imports to be added multiple times
...
Change-Id: Idd0dadcaed4b59173573475d5b115e0fc6228184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-08-04 16:20:07 +00:00
Konstantin Shcheglov
62f73a5bd9
Add DartType.alias, deprecate aliasElement/aliasArguments.
...
Change-Id: I80e0c47c8f431eb504044f4110b55add64c943d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-07-19 21:56:34 +00:00