Brian Wilkerson
1ad68b9b16
Make local variables that hide fields be final (analysis_server)
...
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.
Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-24 18:12:07 +00:00
Konstantin Shcheglov
7d1aedca3c
Remove nullability from naming conventions.
...
We don't allow nulls there anymore.
Change-Id: I44639fee24bbd3856798ae15739b70cc0c660b25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-20 16:32:33 +00:00
Brian Wilkerson
54fc28ec25
Migrate remaining unblocked tests
...
Change-Id: I30e3c22db7df6e78be88125f20eea2dce054f446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195860
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-19 15:57:38 +00:00
Konstantin Shcheglov
5dd02f0583
Add getParsedLibrary2(), deprecate getParsedLibrary() and other parse related
...
Change-Id: I585fa1f01b71522dc99ba86c2b9e20da256b2d27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-19 15:52:39 +00:00
Konstantin Shcheglov
2622d728ae
Add getLibraryByUri2(), deprecate getLibraryByUri().
...
R=brianwilkerson@google.com
Change-Id: I6769ccb5767408490934693cc9019d5af1d8d8d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-19 00:19:32 +00:00
Konstantin Shcheglov
26d9fbbd04
Add getResolvedUnit2(), deprecate getResolvedUnit().
...
Change-Id: I0217fefb2747f2f9bd757bc041b53acaf3d1a8f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-16 21:33:54 +00:00
Konstantin Shcheglov
7eda3cfe76
Migrate test/services/refactoring/
...
R=brianwilkerson@google.com
Change-Id: Ica52e54ba277969ae8a3b63627902ba53045397f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195494
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-16 18:11:16 +00:00
Konstantin Shcheglov
de09de4976
Migrate lib/src/services/refactoring/
...
Change-Id: I17b11b8ea60ef141444b6c8108189d7a8588217f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195493
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-16 16:01:22 +00:00
Konstantin Shcheglov
4dc165f7fd
Add getUnitElement2(), deprecate getUnitElement().
...
Change-Id: Ib1ed93f215356442ca9db5b8ed5fab99667e996e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-15 17:16:27 +00:00
Brian Wilkerson
41641e9c8f
Migrate more completion support
...
Change-Id: I073972400bb79166a836e517e268452a03b64f52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-12 16:30:16 +00:00
Brian Wilkerson
77cfcff92f
Migrate postfix completion
...
Change-Id: I92a96785777c651fef7c8a68762c954ba652d68f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194964
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-12 14:12:21 +00:00
Brian Wilkerson
ecdb3689b9
Migrate widget descriptions
...
Change-Id: I2c6cd72b5572ff30642a5c836adea8839fe2e964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-12 14:08:16 +00:00
Brian Wilkerson
9b1583101e
Migrate statement completion support
...
Change-Id: I9d6751888286e4a068fc1dac192c93ffb8089b69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194963
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-11 15:28:25 +00:00
Brian Wilkerson
52d3191dfd
Make completionOffset non-nullable as per earlier feedback
...
Change-Id: I41eb78f804081b34799716a42c5d3d5e2ece51d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194902
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-10 19:54:24 +00:00
Brian Wilkerson
08c5b9f8ff
Migrate more completion support
...
Change-Id: Ia55132ef8f4cd6e80dfc4fe16689e8b4e50cf387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194821
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-09 22:40:03 +00:00
Brian Wilkerson
beea8076cd
Migrate more of server
...
Change-Id: I6342016847257ae95314e97b2f31186c43f10e6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194481
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-08 19:05:30 +00:00
Konstantin Shcheglov
2af2f3559d
Migrate lib/src/services/correction/util.dart
...
R=brianwilkerson@google.com
Change-Id: Ie85217c57e26fc2430e916c8b7829d64ffddc4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194210
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-07 20:52:03 +00:00
Brian Wilkerson
abd80dc17d
Migrate some tests in server
...
Change-Id: Ic7b3c155529dc241f3cd3ec4cc79ee60fb4295b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194208
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-07 17:08:57 +00:00
Konstantin Shcheglov
1469f984fc
Migrate lib/src/services/search/
...
Change-Id: I52b2fb72952c0abacb897607d6969bedbfd027b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194114
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-06 22:58:25 +00:00
Danny Tuppeny
06729f230a
[analyzer] Don't produce edits during MOVE_FILE for directives that don't change
...
Fixes https://github.com/dart-lang/sdk/issues/45593 .
Change-Id: I4110c5a6bc4a08caff7d40cd288ae554625703e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-05 22:20:56 +00:00
Brian Wilkerson
99814617b0
Migrate more of server to null safety
...
Change-Id: I8989f5f9a45a9c832f0aeb56397fed978386ce30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194041
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-04 21:40:55 +00:00
Brian Wilkerson
0190d20bd6
Migrate some tests and test utilities in server
...
Change-Id: I0a37352c903bf7139af25aab255fe6a5331ce98b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-03 19:23:44 +00:00
Brian Wilkerson
744fa0ba2d
Migrate some additional libraries and their tests
...
Change-Id: I3aae14488fb5def205788a60b27d33211c88d330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193889
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-02 20:02:22 +00:00
Konstantin Shcheglov
e97f1bdbf0
Switch analysis_server to language 2.12, so null safety, but opt-out files.
...
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.
Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-30 23:39:37 +00:00
Konstantin Shcheglov
92130a010e
Tests for DAS services and generic annotations.
...
Change-Id: I063c78ae778366e60bb0d4aca55c4e7fd70f3d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193091
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-25 23:38:24 +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
Sam Rawlins
1cb203d8c9
Remove unused code and files from analysis_server:
...
* ManifestFixKind, PubspecFixKind, ImportElementInfo class
* WithNullSafetyMixin mixin
* suggestionComparator function
Change-Id: I9e332be6345b2f2b7b788bc4ae63a075a21cbe06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-03-16 05:08:24 +00:00
Danny Tuppeny
cf3dcc4256
[analyzer] Prevent MOVE_FILE using absolute URIs when moving files out of lib
...
Fixes part of https://github.com/dart-lang/sdk/issues/41889 , maybe part of https://github.com/dart-lang/sdk/issues/43602 .
Change-Id: Ic7a1e81a280e9786e26f0075ea079e0136e934b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-15 18:42:44 +00:00
Brian Wilkerson
2f3c274632
Clean up some code in analysis_server
...
Change-Id: Icaa4cc19d1966e3dbc70f82745e4fd771a18ed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190728
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-12 04:45:39 +00:00
Brian Wilkerson
d043b1428e
Resolve type parameters to their bounds when suggesting instance members
...
Change-Id: I19fe690216ba0c0dd7d0444d7bda4a58aaa3e8a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190723
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-11 19:14:30 +00:00
Brian Wilkerson
84cafbde9d
Remove some unused code from analysis_server
...
Change-Id: I369a93a9d67cf6a9346e0edcc439d34a8e959e3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-04 21:13:29 +00:00
Danny Tuppeny
f03ec46eff
[analyzer] Detect completion inside comments at the end of file
...
Fixes https://github.com/dart-lang/sdk/issues/33183 .
Fixes https://github.com/Dart-Code/Dart-Code/issues/3170 .
Change-Id: Ia8c76ace89e424f5cca08120282e886e7567ee2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-02 16:25:04 +00:00
Danny Tuppeny
526e191a57
[analyzer] Return isQualified=true for the name of a constructor
...
Fixes https://github.com/dart-lang/sdk/issues/45105 .
Change-Id: Ic7878bd14e6b9b9ee522b5b7d91f25137ab6f31f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-25 17:00:41 +00:00
Danny Tuppeny
cc7bd35516
[analyzer] Support completing argument names in function expression invocations
...
Fixes https://github.com/dart-lang/sdk/issues/42064 .
Change-Id: I186bef47771a56844833fc908c183358955e11ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-09 21:44:32 +00:00
Brian Wilkerson
c723dae62f
Add missed tests for noSuchMethod relevance
...
Also renamed other tests in this directory to not duplicate the
directory name.
Change-Id: I8aec73c6e44ca05f385f21b32f9c5feef1df67ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-05 18:33:57 +00:00
Konstantin Shcheglov
3be5f7c356
Use Future<void> when extract an async method that returns nothing.
...
R=brianwilkerson@google.com
Change-Id: Ic148974ba587310c475795caf8ed0c8565d96909
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182664
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-03 22:25:39 +00:00
Konstantin Shcheglov
02d2b4fb8a
Update CorrectionUtils.getTypeSource() to support any type aliases.
...
Change-Id: I6bb3ea6c60adc2efe071b58369296de4d63fd6d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182602
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-03 20:26:29 +00:00
Brian Wilkerson
388b6ff746
Add failing tests for suggesting else in an if element
...
Change-Id: I8e04fc190a598c812da68b328e5e5628afa01cb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-01-30 21:09:17 +00:00
Konstantin Shcheglov
0c3696d76a
Switch refactoring tests to 2.12 + non-function type aliases.
...
Change-Id: Iaf366ba1ee5f05d47a6ae102a9c5f2daeb8112c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-29 01:32:35 +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
974926e468
Update StaticMemberContributor to support completion via non-function type alias.
...
Change-Id: Ic59fba42a8ddad52a55f0f323dc199d78597a9c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-27 23:23:05 +00:00
Konstantin Shcheglov
3a5294c7e6
Fixes and tests for completion in non-function type aliases.
...
Change-Id: I69cf74380fc1c251e0f44334fdff17f327cafeaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-27 19:27:35 +00:00
Konstantin Shcheglov
83a72e18f3
Switch completion tests to WithNonFunctionTypeAliasesMixin, updates and tests for suggesting non-function type aliases.
...
Change-Id: I0066d479b23b46e0aaaae43aebdc1bbc58336ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181282
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-26 23:04:05 +00:00
Konstantin Shcheglov
79c35e872d
Update messages for checking the name of a type alias.
...
R=brianwilkerson@google.com
Change-Id: I6a523d3b5f8db07f1f1e1e779c1e9aacf885b173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-26 23:03:55 +00:00
Konstantin Shcheglov
d8961dc2c9
Test that rename refactoring works for non-function type aliases.
...
Change-Id: I801be01b73f0e27245ec8958b0a18e521615c8e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-26 22:11:45 +00:00
Konstantin Shcheglov
64a8d2a8b8
Fix for indexing constructor references in documentation comments.
...
Bug: https://github.com/Dart-Code/Dart-Code/issues/2816
Change-Id: I4515b6887f5d8bd93fc6ba59812c5a9ec14f0d3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-26 20:15:44 +00:00
Konstantin Shcheglov
1711659823
Replace findNodeAtOffset() and findNodeAtString() with FindNode.
...
R=brianwilkerson@google.com , pquitslund@google.com
Change-Id: I7058e347d504e7017e6229e520669d45602decd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179369
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-15 17:15:42 +00:00
Konstantin Shcheglov
56903e6cfb
Replace findElementInUnit(), findLocalFunction(), and findLocalVariable() with FindElement.
...
Change-Id: I508b63fee81dc087489055448debb495a06eff6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-14 23:15:25 +00:00
Konstantin Shcheglov
cfe510ade8
Test for search of non-function type alias.
...
Change-Id: Iab2fc3980563a321eec3cf4e843d487b7b2b399d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179320
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-14 21:52:13 +00:00
Konstantin Shcheglov
68025f0170
Use findNode and findElement more in DAS tests.
...
Change-Id: I949f1613d6d427ef3bddb9b4ab40b7feb012985b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-14 20:50:03 +00:00