Danny Tuppeny
88408d562b
Fix LSP refactor test on Windows
...
Removes the recently-added base class to tests (which brought more with it than we needed - and caused issues on Windows) and adds in the flutter/meta packages using helpers (inc extracting the meta package to a new helper).
Re-enable skipped LSP refactor test
Change-Id: I62f8b3e300a776cae4fbd6d15deafb5b8970eef0
Change-Id: I165b9acf75a3ec9a91feb1730be2949eb4d5e5cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2019-06-19 20:00:15 +00:00
Danny Tuppeny
1aa89591e3
Add LSP support for Extract Widget
...
Change-Id: I0d7068ab48eff2a27a00fad5e821e819c816a253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106351
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2019-06-19 06:56:22 +00:00
Konstantin Shcheglov
d5038fc976
Stop using FileContentOverlay in RuntimeCompletionComputer and AbstractContextTest.
...
RuntimeCompletionComputer still is not good to work with AnalysisSession,
but now does not use the deprecated API.
R=brianwilkerson@google.com
Change-Id: I07f5e496c6f268c4d213ebb3794fa214b437f21e
Reviewed-on: https://dart-review.googlesource.com/c/92525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-02-09 22:26:19 +00:00
Brian Wilkerson
af303a277c
Add some assists for the code-as-ui features
...
Change-Id: Ie01b1875fb35eab1427b2869f9c009a06c048412
Reviewed-on: https://dart-review.googlesource.com/c/91841
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-02-02 17:37:55 +00:00
Brian Wilkerson
3533da6d58
Add fixes for a couple of hints
...
Change-Id: I2e1b6c74c30857788b3bfbfbca46fc932dd7817a
Reviewed-on: https://dart-review.googlesource.com/c/90440
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-01-23 18:21:07 +00:00
Konstantin Shcheglov
c91a245e30
Use ChangeWorkspace to limit where DartChangeBuilder(s) can edit.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/35402
Change-Id: If5f78b44b69f01d9ddc235401f70cc4aefd3ca37
Reviewed-on: https://dart-review.googlesource.com/c/87382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-14 22:32:35 +00:00
Konstantin Shcheglov
f96a7fbc7d
Create AnalysisDriver using AnalysisContextCollectionImpl in pkg/analyzer_plugin tests.
...
Mostly to ensure that AnalysisDriver/Session knows its AnalysisContext,
so we can check that a file path belongs to the context root.
R=brianwilkerson@google.com
Change-Id: I45798bcf2441716ade89e9f6ee40f2053ab18bad
Reviewed-on: https://dart-review.googlesource.com/c/87268
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-14 19:18:44 +00:00
Konstantin Shcheglov
61a1793574
Issue 35162. Include SDK version constraint into AnalysisOptions.
...
So, analysis result signatures depend on it and recomputed when it
is changed.
Also, change analysis server to update analysis options not only
when analysis_options.yaml is changed, but also when pubspec.yaml
is changed.
R=brianwilkerson@google.com , paulberry@google.com
Bug: https://github.com/dart-lang/sdk/issues/35162
Change-Id: If4b937c26212d3da74ac7125eb2c6f70dbcb1793
Reviewed-on: https://dart-review.googlesource.com/c/85405
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2018-11-27 00:57:27 +00:00
Brian Wilkerson
01e0df71a8
Stop unnecessarily extending Object
...
Change-Id: Ib557755916b09be4e1ad1b1c2e4bed052a280513
Reviewed-on: https://dart-review.googlesource.com/c/84640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-16 16:43:24 +00:00
Konstantin Shcheglov
b71948faee
Consolidate MockSdk(s) into one, living in analyzer/lib/src/test_utilities.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I70946b8e6f790608ad52c8f27cd6f506673f7b0d
Reviewed-on: https://dart-review.googlesource.com/c/82710
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-02 21:52:44 +00:00
Konstantin Shcheglov
0299b98197
Renames for addPackageFile() / addPackageMeta().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I9d710d76186f5e54592457ac8708551ac096a43a
Reviewed-on: https://dart-review.googlesource.com/c/82465
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-01 17:24:26 +00:00
Brian Wilkerson
298d22f4ab
remove async parse method
...
Change-Id: I7a2e633b43283221790fb88a12065fed3dcdabb7
Reviewed-on: https://dart-review.googlesource.com/c/82120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-30 19:26:00 +00:00
Konstantin Shcheglov
ff25f47862
Remove processRequiredPlugins() and configurePreviewDart2().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ic93ba6b148e7bb6e7fc001dc2aceb4feaf8fa29f
Reviewed-on: https://dart-review.googlesource.com/c/82081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 17:40:29 +00:00
Konstantin Shcheglov
1c6774ba34
Create AnalysisDriver in AbstractContextTest using the new API.
...
Change-Id: Ia3b8e0fa297026f8d002cf4b29f179e686876d8c
Reviewed-on: https://dart-review.googlesource.com/c/81980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 15:57:59 +00:00
Konstantin Shcheglov
7c80d22878
Make indexing in AnalysisDriver optional.
...
This makes my Flutter benchmark about 6% faster.
It will not affect performance of `flutter analyze`, because for now
Analysis Server always enables indexing and search. But we could make
this optional, for DAS clients that need only errors, but not search,
refactorings, etc.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I4eafc37592a3bb18bd2c6ab84dc2515a4d42697b
Reviewed-on: https://dart-review.googlesource.com/c/80880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-21 20:20:05 +00:00
Peter von der Ahé
2a6b566ca2
Move byte store to package:analyzer
...
Change-Id: I1fc41cc0b2e2848565a5411d0512a4ca086ab659
Reviewed-on: https://dart-review.googlesource.com/c/77761
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Auto-Submit: Peter von der Ahé <ahe@google.com >
2018-10-04 09:15:54 +00:00
Peter von der Ahé
45cb0815bc
Move PerformanceLogger to package:analyzer
...
Change-Id: I89a60ae9ab639c7907a92976e1eb8007d0f4ee9b
Reviewed-on: https://dart-review.googlesource.com/c/77760
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Auto-Submit: Peter von der Ahé <ahe@google.com >
2018-10-04 08:44:43 +00:00
Konstantin Shcheglov
1f52372bfa
Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
...
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.
Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-29 13:46:45 +00:00
Brian Wilkerson
0bcf767d4d
Clean up more preview-dart-2 related code
...
Change-Id: Id1f81a635727f0f2fafb5dea4178f303c6ca4659
Reviewed-on: https://dart-review.googlesource.com/70143
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-15 14:43:12 +00:00
Brian Wilkerson
83aa463fac
Enable a few more server tests under CFE
...
Change-Id: I5f0bd750d3da7658f836e45f02da5ef157e752ff
Reviewed-on: https://dart-review.googlesource.com/68960
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-08 17:13:28 +00:00
Brian Wilkerson
6137511849
Add more CFE tests for server
...
Change-Id: I51b36a988c83e2f20f3e76d01fdb09644c2c2ce2
Reviewed-on: https://dart-review.googlesource.com/68760
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-08 15:01:32 +00:00
Konstantin Shcheglov
80e08e0913
Use 'useCFE' flag to turn on CFE in AnalysisDriver.
...
R=brianwilkerson@google.com
Change-Id: If0aa7d10bc46f1dd408d0be8128fc25538758359
Reviewed-on: https://dart-review.googlesource.com/68720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-07 16:12:47 +00:00
Brian Wilkerson
bc8a8386af
Fix tests that reference the flutter package
...
Change-Id: Idd1949db259d747abb063328901f42be29ba57b2
Reviewed-on: https://dart-review.googlesource.com/68581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-07 15:48:37 +00:00
Brian Wilkerson
b0de4d8ac0
Add support for and a few additional CFE-based tests
...
Change-Id: I8e52f41cc54341c4321e688ae46a6392e69f98ab
Reviewed-on: https://dart-review.googlesource.com/68500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-06 21:04:02 +00:00
Devon Carew
2dd33c2a6c
Have the package:analyzer strong mode option hard coded to on. Delete several spec mode only tests.
...
Change-Id: I5dffec68d9845fe75936d55100c03306b6eda363
Reviewed-on: https://dart-review.googlesource.com/64060
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-07-10 05:30:10 +00:00
Paul Berry
993b4caf0e
Make the change to ContextRoot non-breaking.
...
In 4cf51e6c1a , a new argument was added
to the ContextRoot constructor, changing its signature in a breaking
way.
In theory this should not have broken other packages, because
ContextRoot is declared inside analyzer/lib/src. But it turns out
that two packages are known to import from analyzer/lib/src and
construct ContextRoot: angular_analyzer_plugin and
built_value_generator. To avoid breaking these packages, we need to
add the new constructor parameter as an optional (named) parameter.
Some time after after angular_analyzer_plugin and
built_value_generator have been updated, I'll send a later CL to mark
the named parameter as @required.
Change-Id: I5be063dd47a3dfefba08cb444687b91bf2ba3625
Reviewed-on: https://dart-review.googlesource.com/56603
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-05-24 21:56:25 +00:00
Konstantin Shcheglov
4cf51e6c1a
Give (the old) ContextRoot path.Context to work with paths.
...
R=brianwilkerson@google.com
Change-Id: I7699bb50ea4b6239c61c69de5e8e2ceeed64ea64
Reviewed-on: https://dart-review.googlesource.com/56024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-05-21 22:04:24 +00:00
Konstantin Shcheglov
76a30dd594
Initial implementation of 'execution.getSuggestions'.
...
Only local variables, no tests for multiple blocks, or parameters.
No support for classes yet.
No support for expressions or runtime variable types.
R=brianwilkerson@google.com
Change-Id: I9ec5c40e407cda48be408e4e4882d97349413b9c
Reviewed-on: https://dart-review.googlesource.com/55762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-05-17 20:25:04 +00:00
Konstantin Shcheglov
f62302b8ee
Make extracted widgets follow Flutter style - const constructor and @required named parameters.
...
R=brianwilkerson@google.com , pquitslund@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/2166
Change-Id: I28f548c8e814ac5b9585dd46fbb9a8f84f70f418
Reviewed-on: https://dart-review.googlesource.com/54066
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-05-07 20:59:04 +00:00
Konstantin Shcheglov
b7a63c8d52
Use @isTest and @isTestGroup to understand executable element as a test/group.
...
R=brianwilkerson@google.com , devoncarew@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/2055
Change-Id: I7c8e7639d111eca63df0780ebdec182573493047
Reviewed-on: https://dart-review.googlesource.com/53690
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-05-04 17:09:06 +00:00
Brian Wilkerson
7054d92a02
Remove some classes from the analyzer public API
...
Change-Id: Ic53a8426818b06f44c2876abd16c789589bf78b5
Reviewed-on: https://dart-review.googlesource.com/52421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-04-24 15:28:15 +00:00
Brian Wilkerson
5460ddbab5
Move three more libraries out of the public API
...
Change-Id: I8e6aeaea35c739fb26e22ffcfc30a343ebbb5424
Reviewed-on: https://dart-review.googlesource.com/51363
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-04-16 22:15:28 +00:00
Brian Wilkerson
a0295ffa0e
Convert analysis_server tests to pass under preview-dart-2
...
Change-Id: Ibfdc53c7b1252166d44a0bda077e464a8c474572
Reviewed-on: https://dart-review.googlesource.com/46574
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-15 18:49:24 +00:00
Konstantin Shcheglov
0ce1a92d98
Suggest constructors for implicit creation in previewDart2.
...
R=brianwilkerson@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: I43270f47fb43402d1a9e0f7d9814494ffd83bb5e
Reviewed-on: https://dart-review.googlesource.com/43080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-02-22 18:03:12 +00:00
Danny Tuppeny
20578644c0
Fix all remaining broken FixProcessorTest tests on Windows
...
See #32226 .
Change-Id: Idc80d0ac7441e1db8c0213093b9b79d4b3e70315
Reviewed-on: https://dart-review.googlesource.com/42700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-02-21 17:19:19 +00:00
Konstantin Shcheglov
95f336a667
Don't suggest imports of private libraries from other packages.
...
R=brianwilkerson@google.com , devoncarew@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/1661
Change-Id: I5e458e8815d4f8df3e2f22bdfdc21c7203cefde0
Reviewed-on: https://dart-review.googlesource.com/41620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-02-15 17:11:56 +00:00
Konstantin Shcheglov
0ff7348c7b
Switch tests to use Flutter package mock that more closely resembles the actual package structure.
...
So, we can test that "Wrap with Center" works when we ask for Center
in package:flutter/widgets.dart
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I3446f5cf97c1d6f2e68686de6561d894b5e95620
Reviewed-on: https://dart-review.googlesource.com/38162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-01 22:12:06 +00:00
Brian Wilkerson
8e7781ea9e
Convert remaining tests to use ResourceProviderMixin
...
Change-Id: I7bd0941a415737bd3c9c55e9650f2a982937f777
Reviewed-on: https://dart-review.googlesource.com/31961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-01-02 16:33:14 +00:00
Jens Johansen
22d0696d91
[CFE] Move front-end API under src/
...
This CL deprecates the front-end API and moves it into src/api_prototype.
For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)
Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2017-12-01 08:42:16 +00:00
Konstantin Shcheglov
5ea30b4e3d
Rename performace_logger.dart to performance_logger.dart
...
R=paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov
1b4239d2e4
Export ByteStore and its implementations from front_end.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-07 19:23:21 +00:00
Paul Berry
89c910b9c1
Move byte_store.dart and file_byte_store.dart to their own subdirectory.
...
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.
R=scheglov@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Brian Wilkerson
9a6b134d33
Improve name generation for indexed expressions
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2990793002 .
2017-07-27 07:58:34 -07:00
Konstantin Shcheglov
00d5012906
Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...
...instead of mixing formatting with actual changes in many CLs.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Brian Wilkerson
4337a3aeee
Cleanup some unused code in some of the tests
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2942433002 .
2017-06-13 14:01:17 -07:00
Brian Wilkerson
aa33d71071
Another attempt to fix the windows tests
...
Review-Url: https://codereview.chromium.org/2927873002 .
2017-06-07 12:35:56 -07:00
Konstantin Shcheglov
ab9ee72a34
Switch server tests to strong mode.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2903523003 .
2017-05-23 14:58:53 -07:00
Brian Wilkerson
7d26ff6d4f
Remove some more library directives
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
Konstantin Shcheglov
a4fd5d814f
Extract PerformanceLogger from AnalysisDriver.
...
I also added the runAsync().
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Konstantin Shcheglov
bd1ee32543
Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
...
We are going to reuse ByteStore in front_end, also for incremental
compilation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00