Konstantin Shcheglov
6408a9cc4d
Tweaks for writeType() and summary2.
...
R=brianwilkerson@google.com
Change-Id: If3c682f3dfc12a9e13d805bc25476b16249c7754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113273
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-08-17 07:28:52 +00:00
Brian Wilkerson
b40b301564
Add more extension completion tests and fix a bug they uncovered
...
Change-Id: I3e89eed886e3100e2d1942e38b124f99bebd6b3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113385
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-08-16 19:39:45 +00:00
Konstantin Shcheglov
8280a31ef0
Fix CREATE_LOCAL_VARIABLE for function typed variable.
...
R=brianwilkerson@google.com
Change-Id: If9ecaa595e36ec8f3c9ff112acb235a03372248b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-08-16 17:49:15 +00:00
Brian Wilkerson
ba5c2a16bd
Support completion of extension members
...
Change-Id: I78a59216add7ea612d77bae0d3e52a0185a682e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-08-16 14:30:37 +00:00
Brian Wilkerson
4f9293962b
Add a navigation test
...
I wrote the test to debug why navigation wasn't working for me in the
editor, but the test passes. I think it's worth capturing the test.
Change-Id: Ieb4c6380dcd07fbec67d6b508d97087303c428ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113212
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-08-15 20:23:52 +00:00
Brian Wilkerson
5f824e572d
Return extensions from search.topLevelDeclarations
...
Change-Id: Iaa6ccbf9f0b1060148d81ff96670315aa7ae73e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113209
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-08-15 19:18:03 +00:00
Brian Wilkerson
802937e5a6
Add support for completions inside extension (and mixin) bodies
...
Change-Id: I549e91ac7a8e293ea6592043988a67a2da680620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113133
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2019-08-15 16:39:05 +00:00
Konstantin Shcheglov
9776e3699f
Tests and fixes for searching extensions and extension members.
...
R=brianwilkerson@google.com
Change-Id: I6fda5fd473f9a215d29024eb315af702a11bce42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112931
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-08-14 01:36:46 +00:00
Konstantin Shcheglov
37a483ef78
Set incorrectly referenced static element, and test CHANGE_TO_STATIC_ACCESS.
...
R=brianwilkerson@google.com
Change-Id: I8d479ccd17fc3f6429d7fa17bc4e78955194095d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112935
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-08-14 00:33:06 +00:00
Ari Aye
3cc20cd185
Remove quotes from suggestions coming out of model when completion is requested inside of quotes
...
There's an issue right now where accepting string literal model completions inside of quotes
will produce duplicate quotes.
Bug: https://github.com/dart-lang/sdk/issues/37820
Change-Id: I7c2f280c8050bd583c4ab49bf97f86fec3df6d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112749
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-08-13 18:54:40 +00:00
lambdabaa
d19a590687
Extract the lexeme from included suggestion tags when correlating with model results
...
Make sure that we're comparing model lexeme to analyzer lexeme since https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart#L226 .
Change-Id: I01d93623fb09ecc169be92674b58a91ef0bf56ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112263
Commit-Queue: Ari Aye <ariaye@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-08-07 20:40:55 +00:00
Danny Tuppeny
31cd2bd75a
Ensure LSP completion filterText doesn't include '()' or '(…)'
...
Change-Id: I01c380ee3a36dbdd15706cb55b108899cacd9fc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112249
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2019-08-07 15:25:40 +00:00
Konstantin Shcheglov
e04dc4dd63
Update statuses and expectations with summary2 for some tests.
...
R=brianwilkerson@google.com
Change-Id: I48eeb07a5423bb35512b4b583a9b2a942cb2d83a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112043
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-08-06 17:42:39 +00:00
Konstantin Shcheglov
a62de52d04
Insert new named arguments before 'child' or 'children'.
...
R=brianwilkerson@google.com
Change-Id: Idbe5bb7efbeaa81a8f2319fab929944e7b3492d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112027
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Jacob Richman <jacobr@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-08-06 01:31:27 +00:00
danrubel
8b2993568e
implement dartfix --pedantic
...
This CL adds a new --pedantic option to dartfix for applying all fixes
marked as pedantic. In addition, this addresses comments in
https://dart-review.googlesource.com/c/sdk/+/111840
Change-Id: Ia2e7a792911f19edb698c126c8fd77cd8f8f77cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-08-05 20:18:05 +00:00
danrubel
1c5911982e
add includePedanticFixes flag to dartfix protocol
...
Change-Id: I43c40eacf038beed6245ec873e746dcbb1ed80df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-08-05 20:18:05 +00:00
Konstantin Shcheglov
cdf6103b38
Support for free-form 'expression' in FlutterWidgetPropertyValue.
...
Also add ENUM_LIKE property editor, that is like ENUM, but allows
such free-form expressions.
R=brianwilkerson@google.com
Change-Id: I3910b6bea98110c192b6cc9fb716b73270e1d97c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111985
Reviewed-by: Jacob Richman <jacobr@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-08-05 18:43:29 +00:00
Danny Tuppeny
3011ca2da7
Include "import function" fixes for UNDEFINED_IDENTIFIER
...
Change-Id: I66ad76e82f419ed19ca8e47574d1ec8335571bd5
Bug: https://github.com/Dart-Code/Dart-Code/issues/1898
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111738
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2019-08-05 16:27:07 +00:00
Brian Wilkerson
f8f77eb4c0
Add keyword completion suggestions
...
Change-Id: I2ec6de7a68397aa9e43b155db52c5473e3d7035d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111667
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-08-02 15:09:01 +00:00
danrubel
fc5b4e3cef
Rework dartfix lint fixes to remove race condition
...
This refactors the way that dartfix finds lints to fix to be based on
error codes rather than manually running the lints. This prevents
a race condition that occurs between calling setAnalysisRoots and
requesting fixes.
Fix https://github.com/dart-lang/sdk/issues/37558
Change-Id: I35817a9b152a28db9e78662a5ea5096f275f68bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-08-02 02:04:57 +00:00
Brian Wilkerson
86bdb3e3fa
Clean up some warnings in analysis server code
...
This also sorts the content of these files. The analyzer team uses the Sort Members function on all of the source code in our packages.
Change-Id: Id0700954aefe63f6c7d2e43df021997f95ad7e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111663
Reviewed-by: Ari Aye <ariaye@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-08-01 21:24:00 +00:00
Konstantin Shcheglov
6a4d805df4
Implement 'Import Library' quick fix using DeclarationsTracker.
...
This reverts commit 143e5ef556 .
Change-Id: I3c575ff690fd8c8d93a90e50a451a6ec993c4164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111305
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-31 22:14:21 +00:00
danrubel
3f22f1f5df
do not include double-to-int fix by default
...
This changes the default fixes applied by dartfix so that it no longer
converts doubles to ints by default. The fix can still be applied
by specifying '--fix double-to-int' on the command line.
Change-Id: I751a42a9c6ae6589259e0b7ac5c769fd4efc4313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-07-30 18:05:50 +00:00
danrubel
8dc24d0919
report dartfix error for unknown fix
...
Change-Id: I0ebc73423d46ad5c07f4755847fe2ec68020428f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-30 18:05:50 +00:00
lambdabaa
8f0b6c89e2
Fix uri of dart_completion_ranking_internal_test.dart import
...
Change-Id: Iafaff006e6b2d52b88498d3674e854fe284ae927
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-30 00:44:04 +00:00
Ari Aye
752f06fff5
Make sure to import and run completion_ranking_test_internal.dart in test_all.dart
...
Change-Id: I410521737c7c7c2bd45377408769b3b6cbcb8425
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Ari Aye <ariaye@google.com >
2019-07-29 20:41:43 +00:00
Ari Aye
a650cb67f7
Make sure that completion_ranking_test.dart is loaded in test_all.dart
...
Change-Id: I9933282a9e137c8a3014d1698bfaf50914b72cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Ari Aye <ariaye@google.com >
2019-07-29 17:01:52 +00:00
lambdabaa
fc82ed2286
Isolate-based CompletionRanking
...
Screenshots: https://i.imgur.com/IOLKOCU.png , https://i.imgur.com/dM9VsNr.png
Change-Id: Ieae0f9066b7a349bb4adff6b327b67bcae49aab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-29 13:45:23 +00:00
Konstantin Shcheglov
ec5bf35152
Update analysis_server and analyzer_plugin to stop using DartType.isSubtypeOf().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: If7365bd82b97bd692af9508697307976ea7c69e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110881
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-29 00:19:37 +00:00
lambdabaa
a9ebb5c3c8
Enable running language model unit tests on windows
...
Change-Id: I63457934fcd23510f6a2848fbb00361ebb40a40f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Ari Aye <ariaye@google.com >
2019-07-27 20:57:59 +00:00
Brian Wilkerson
306a592fe4
Add a test for hovers now that doc comments are preserved
...
Change-Id: I7ee4397bcbf328aa41e96cd444470eb6fcaa7dbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110768
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-27 14:06:38 +00:00
Brian Wilkerson
e57b7f2101
Update member sorter to sort extensions
...
Change-Id: I710123e389adfdd5191ff7538be17982d8f3630c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110767
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-27 14:06:30 +00:00
Brian Wilkerson
6241ea1788
Disable running a test from test_all that breaks when run from a parent directory
...
Change-Id: I08c45f2e54c483e0cbe4bc46a9759c019c8d3f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110743
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Ari Aye <ariaye@google.com >
2019-07-26 18:22:39 +00:00
Brian Wilkerson
8b81bb8115
Remove some unused imports
...
Change-Id: I516b544b3bdff07e67f444024789093907369959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110760
Reviewed-by: Ari Aye <ariaye@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-26 16:32:01 +00:00
Ari Aye
5d5a0c0164
Check in token-level language model via tflite ffi
...
Local test run after running `gclient sync`:
ariaye@ariaye1:~/sdk/sdk$ dart pkg/analysis_server/test/services/completion/dart/language_model_test.dart
00:00 +0: calculates lookback
INFO: Initialized TensorFlow Lite runtime.
00:00 +1: predict with defaults
00:01 +2: predict with confidence scores
00:03 +3: predict when no previous tokens
00:04 +4: All tests passed!
Change-Id: I4181bea09cf8fec74d03bba4f83cd26dac818f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-25 18:39:51 +00:00
Brian Wilkerson
eb057fe495
Send the correction as part of the diagnostic message in LSP
...
Change-Id: I894c90b7a895d36c3e9bee7623d1301c8c390b69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Danny Tuppeny <dantup@google.com >
2019-07-24 16:02:13 +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
Konstantin Shcheglov
1e04ff86b0
Mutate Aling(...) and Padding(...) into Container().
...
R=brianwilkerson@google.com
Change-Id: I5d15b93f3262cafe6915c5681c4baede87e7699a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-22 20:09:47 +00:00
Konstantin Shcheglov
1390201177
Support for 'padding' property, and EdgeInsets type.
...
R=brianwilkerson@google.com
Change-Id: I536ee3952d6e280a56b048773a3a5696bc508b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-22 17:15:28 +00:00
Konstantin Shcheglov
1014272f3b
Extent 'alignment' property, copy from Align, virtual Container.
...
R=brianwilkerson@google.com
Change-Id: I9bec5b32e91f3cb77c4996f0ba0e7c2dd424316b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-19 21:41:03 +00:00
Konstantin Shcheglov
c1bb024479
Basic support for Container.alignment property.
...
R=brianwilkerson@google.com
Change-Id: I509df0b9c5d97e00a2f6ec50f31db1d07396f4ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-19 14:42:36 +00:00
Konstantin Shcheglov
07e5b20ec9
Insert new named arguments sorted.
...
R=brianwilkerson@google.com
Change-Id: I56d321160f21ebe20219fcc61288a0ebde1a21f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-18 22:16:58 +00:00
Konstantin Shcheglov
d57ebb0e1c
Fix reporting FLUTTER_GET_WIDGET_DESCRIPTION_NO_WIDGET.
...
R=brianwilkerson@google.com
Change-Id: Id4d84ab6240b4eb9444201c7cb7fca5d1743dacc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109552
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-18 21:55:00 +00:00
Konstantin Shcheglov
2d4973ca17
Format the function body containing the updated property.
...
R=brianwilkerson@google.com
Change-Id: I7f4f1bfa07b663d6079b639bc9003f2828c04e13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-18 21:07:00 +00:00
Konstantin Shcheglov
89a17f218b
Make getDescription() async.
...
We need to request additional elements for editors, and this is async
operation.
R=brianwilkerson@google.com
Change-Id: I451e80e32cf00fa0070f93123b33f0ee4b0ef759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109545
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-18 19:58:10 +00:00
Konstantin Shcheglov
ddafed27cb
Support for enum values.
...
R=brianwilkerson@google.com
Change-Id: I1f95bfb8bd469981a9a6b4444670189a6619405a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-18 17:12:15 +00:00
Brian Wilkerson
b4e66ed3d0
Add highlighting for extensions
...
Change-Id: Ifa790e8e0830276cd794aa903aa5b2a9c1e03a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109464
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-07-17 22:03:07 +00:00
Konstantin Shcheglov
8e17249b62
Refactor Flutter property tests.
...
R=brianwilkerson@google.com
Change-Id: I8b16b8e7bc514f23ea545360db6be59d3cfef576
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-17 20:36:35 +00:00
Konstantin Shcheglov
9d204ca5d8
Start adding 'Container' properties.
...
R=brianwilkerson@google.com
Change-Id: I88c8194545dc3944318b897616e5a500c97ae4d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-07-17 20:03:54 +00:00
Konstantin Shcheglov
202379aaee
Implement getWidgetDescription and setPropertyValue in Flutter domain.
...
R=brianwilkerson@google.com
Change-Id: I45fdb0121bdd067856e5c9e72466d9a5c1a00e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109313
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-16 21:32:37 +00:00