Brian Wilkerson
04173573cf
Migrate tests of data-driven support
...
Change-Id: Iac640c945112afa32d413e67f1b0809e58892dea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195169
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 19:54:48 +00:00
Brian Wilkerson
d7129dc936
Migrate tests of the bulk fix support
...
Change-Id: Ic2de6d929167c6ba53fcfc2484f593058ceff231
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195166
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 18:35:36 +00:00
Brian Wilkerson
770bc1e55c
Migrate fix and assist support for Cider
...
Change-Id: Ie37bc2b7868a0001aba1937322052bbc73147af5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195162
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 17:18:06 +00:00
Konstantin Shcheglov
0a2bd758fc
Migrate test/src/services/correction/fix/analysis_options/
...
R=brianwilkerson@google.com
Change-Id: I21bcd019adde36bd85bb6b8871f19ae49cebea8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195164
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 16:44:16 +00:00
Konstantin Shcheglov
cdbff0e6fb
Migrate test/src/services/correction/fix/
...
R=brianwilkerson@google.com
Change-Id: I61e64a0481b4a4f57fc64fb726315e56d3d82485
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-13 16:19:56 +00:00
Brian Wilkerson
4b4ccbaa0d
Migrate tests for data-driven fixes
...
Change-Id: I845d3dbeb4e6d1726578a2d8f9f01e7c537d54df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195048
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 14:00:11 +00:00
Konstantin Shcheglov
704d18abd8
Migrate test/src/services/correction/assist/
...
Change-Id: I6ba1f5c9916faa67fffdad26f6addfd7b665849b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195050
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-12 22:12:36 +00:00
Brian Wilkerson
14fea36798
Migrate some of the plugin support
...
Change-Id: I5e8cdf215836470f8cf237f0da5155c0ac80e281
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195042
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-12 20:07:16 +00:00
Brian Wilkerson
7f1b4f93bd
Migrate more of the data-driven fix support
...
Other than the changes in
'pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart'
all of these changes have been reviewed before.
This doesn't include some tests that I had previously migrated, but those
depend on a large number of libraries that haven't yet been migrated.
There are some tests that are now migratable, which I'll tackle separately.
Change-Id: I0f77d86d892216bf42d94b098575f6529ca72ed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-12 18:59:26 +00:00
b-stime
c1339411bb
Adds assist for basic Flutter Builder
...
Fixes issues such as
* https://github.com/flutter/flutter-intellij/issues/814
* https://github.com/dart-lang/sdk/issues/33957 .
Essentially, in Flutter, it's often useful to create a new context in the UI/widget tree as a place to begin a search towards the trunk of the tree for various state structures attached to lower levels of the tree. The basic `Builder` widget is the official means for creating such a context/entry-point.
The patches in this PR are essentially a copy-paste-tweak from two types of existing, similar assists. The main origin was taken from `FlutterWrapStreamBuilder` which wraps client code with a constructor for the StreamBuilder sub-class. The new assist, provided here, is a little more basic/general than the StreamBuilder so it was able to also adopt assertion and test code from some of the other assists for basic widgets.
Closes https://github.com/dart-lang/sdk/pull/45656
https://github.com/dart-lang/sdk/pull/45656
GitOrigin-RevId: 00a5043e5dbd410f24f30f6503711413341dbe7a
Change-Id: I5f93837af571b4974e35da131112f82cd9359697
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-12 17:33:06 +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
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
Konstantin Shcheglov
bbbe5bfc87
Migrate several lib/src/services/correction/dart/
...
Change-Id: I8c50c6e7664a7bd8ee7b0d881d9adeaf9c544f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-08 21:17:10 +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
Brian Wilkerson
b0a358c10b
Migrate two more tools in server
...
Change-Id: I5cd174caa77653cc39a37a8c0464f0f1e93c4a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-08 01:03:34 +00:00
Brian Wilkerson
a0f7ff92a1
Migrate the first round of completion support
...
Change-Id: I64ca0b7b6d3040b6e37d328ed62e75059c48ef07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194212
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-07 20:44:58 +00:00
Konstantin Shcheglov
d8da40ec52
Migrate lib/src/protocol_server.dart and related.
...
Change-Id: Ibb1e5a53aa8ad67fa43b315880c491093b051e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-07 00:26:59 +00:00
Konstantin Shcheglov
b173c18796
Migrate LspPacketTransformer.
...
Change-Id: Ib0a84ae01b66e92a9406b559c1c8e4deb52ad3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-06 15:46:37 +00:00
Brian Wilkerson
4cba249477
Migrate a couple of additional libraries and some missed tests
...
Change-Id: I7c107b71a7b6226c8e294428a70656182353a048
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194018
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-05 23:01:26 +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
34873853d8
Migrate some of the plugin support in server
...
Change-Id: I1294a33725ff0d0c3d2eb981c23211a8576f60f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194023
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-04 00:23:39 +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
Brian Wilkerson
90d42351db
Migrate a few more utilities to null safety
...
Change-Id: I2b623713ec3a7c366f6fe7643e7c56bab54f40a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193822
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-02 17:53:32 +00:00
Brian Wilkerson
0f4943c22b
Migrate some of the base test classes in server
...
Change-Id: I010389d51d519968ce7c1ecd8da8811d036d9ab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193830
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-02 14:53:31 +00:00
Konstantin Shcheglov
c2d660d161
Migrate analysis_server and analysis_server_client protocol.
...
Change-Id: Ie0912627733f0481de0d3239647a4978e5327f12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-02 06:46:41 +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
Brian Wilkerson
8c775581e2
Fix a bug in data-driven fixes handling of parameter changes
...
Change-Id: Ic5872a364bfcadc302ec35c0cf63ec87e5e2594b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193444
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-30 04:15:38 +00:00
pq
a68db103ae
rename lintProducerMap2 => lintProducerMap
...
(Also removes deprecated "legacy" lintProducerMap.)
Change-Id: I8c9222657029fe709228e010c4b90f34244814d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193086
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-03-26 14:50:04 +00:00
pq
9847e7fbe6
migrate to lintProducerMap2
...
Change-Id: I90b41091b354f02e84772e797257bf20db404f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192949
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-03-25 14:59:04 +00:00
pq
727d90540d
remove nonLintProducerMap
...
Change-Id: Iae2b150c2dffd8aa13197d08811eed63b707e072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192941
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-03-24 23:12:03 +00:00
pq
67cf58cde8
unnecessary_final fix support
...
Change-Id: I79338f2001d621b83ae4234fd4a79321836167b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-03-24 15:05:41 +00:00
Danny Tuppeny
387e9d9ab2
[analyzer] Include ConditionalExpressions in Flutter Outlines
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3196 .
Change-Id: I369e48285329c808a092ff677440e159aa7a103b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192688
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-24 15:01:21 +00:00
Konstantin Shcheglov
86c5085565
Fix NPE when the return type of a method is inherited.
...
Change-Id: Iaf77f250c806b116f0f0d6bbd3d9b9ff2ab0090d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192540
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-22 21:03:45 +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
Brian Wilkerson
55522f9e90
Fix a bug in completion when a setter does not have a corresponding getter
...
Fixes: https://github.com/dart-lang/sdk/issues/45300
Change-Id: I0a5043b5d395abb426615e8c434f23c20062e182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-15 17:34:53 +00:00
Brian Wilkerson
917688fe3c
Resolve type parameters to their bounds when computing the context type
...
Change-Id: I34349ccf3728e0cc1f1caab4499896f2f827e85b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190721
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-03-11 18:59:01 +00:00
Brian Wilkerson
acdd5231fd
Deprecated setters should not take priority over non-deprecated getters
...
I hadn't really noticed this behavior until we deprecated large numbers
of setters in the AstNode hierarchy.
Change-Id: If068edd0a55a7a828b7ad114ff5812716ff265e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190283
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-10 00:55:42 +00:00
Brian Wilkerson
7a862df2d8
Compute the context_type feature in instance creation expressions
...
Change-Id: I72c34e7ecb24377605b8983bcbdb98bdfd73c6f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-09 23:27:02 +00:00
Konstantin Shcheglov
f94484c8d2
Fix AvailableSuggestionSetsTest on Windows.
...
Change-Id: I1736cb9b28b82b43c5f49661c157fac477ed3a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-09 22:20:44 +00:00
Keerti Parthasarathy
b4adea8f46
Add flutter assist test for Cider
...
Change-Id: Icc04283fd2d37638fcb7382c55f8d409a627a97f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189880
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-03-09 21:32:12 +00:00
Brian Wilkerson
038c653c08
Fix a bug in the sort_child_property_last fix
...
Fixes: https://github.com/dart-lang/sdk/issues/45220
Change-Id: I6634443de0fd87983097cb452238b6b1588ae818
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-09 17:51:00 +00:00
Brian Wilkerson
097a825e4a
Suggest the fix add_ne_null only when the type of the condition is nullable
...
Change-Id: Iaad91d5e8b7f5725a8ccb7430eb3f7570a1eea38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189842
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-08 23:13:43 +00:00
Brian Wilkerson
7d971fad1c
Stop suggesting non-factory constructors for abstract classes
...
Change-Id: I3ed6936d36b0f35cea7950ac089c89efacdf0ca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-08 18:53:51 +00:00
Konstantin Shcheglov
f81be2cd8b
Use AnalysisDriver.addedFiles for search, remove DriverAnalyzedFiles.
...
The client that uses Search - DAS, adds analyzed files.
Visiting the file system again to gather analyzed files is wasteful.
DAS now uses AnalysisContextCollection, so the same set of files.
Change-Id: I2b6ba4181e7ed8cda02db152086d13758ea6f4dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-06 05:15:24 +00:00
pq
82ad11aeb9
fix all support for USE_NOT_EQ_NULL
...
Change-Id: I928c669eed12c7f0a6082db059f7ce4133d4f27a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189164
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-03-04 23:14:20 +00:00
pq
d202a4c719
fix all fix for USE_EQ_EQ_NULL
...
Change-Id: I02f78f01b3fcc647dd8e3ca0557cb4f023a745f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189140
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-03-04 21:58:39 +00:00
pq
567d745312
fix all support for REPLACE_BOOLEAN_WITH_BOOL
...
Change-Id: I9b9c9d1732653697abd66b2d7b0d09e818a33ae3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189101
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-03-04 17:54:39 +00:00
pq
64012a281f
fix all support for REMOVE_UNNECESSARY_CAST
...
Change-Id: I1507f07271390d24aefed9db96a7fbf9e304ff01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189000
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-03-04 16:20:27 +00:00