Konstantin Shcheglov
5711a1d539
Move implementations of analysis results into src/results.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I7527dfb597ff54802517093b4aa526b14e7b705c
Reviewed-on: https://dart-review.googlesource.com/c/82461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-01 16:11:23 +00:00
Konstantin Shcheglov
d6d312cca6
Add 'Wrap with StreamBuilder' quick assist.
...
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I109bfe41344943b6d1b456cb178f1db4d5e92858
Reviewed-on: https://dart-review.googlesource.com/c/82341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-01 15:33:04 +00:00
Konstantin Shcheglov
c843a4fdbd
Replace resourceProvider.convertPath() with just convertPath() where possible.
...
R=brianwilkerson@google.com
Change-Id: I80c349b0ed9092e455ca2d811f5828765361ffc7
Reviewed-on: https://dart-review.googlesource.com/c/82163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 23:55: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
Brian Wilkerson
57c185c89d
Remove remaining uses of Element.context from server
...
Change-Id: Ibc383064951e181fa8e951714904526c2ea42f5f
Reviewed-on: https://dart-review.googlesource.com/c/81749
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-29 14:56:24 +00:00
Brian Wilkerson
faa8bcd78c
Finish spliting out the non-lint fix tests
...
Change-Id: I793a9663ad3a9adfec4248844a5881f857fb4c4c
Reviewed-on: https://dart-review.googlesource.com/c/81748
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-28 18:11:37 +00:00
Konstantin Shcheglov
5b1641432d
Create CorrectionUtils only for ResolveResult.
...
So, it is always self-consistent, never ask AnalysisContext for the
unit file content.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I93e71f7f8fa577b8e123c91252f3038a50cdccef
Reviewed-on: https://dart-review.googlesource.com/c/81580
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-26 14:04:12 +00:00
Konstantin Shcheglov
20d81452e5
Remove AstProvider, use AnalysisSessionHelper.
...
This is a step toward making CorrectionUtils constructor accept full
ResolveResult, instead of partial (and potentially inconsistent) unit
and AnalysisContext.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ic386d48af2d00ecaf9ef13b8480e7e78c7d52efc
Reviewed-on: https://dart-review.googlesource.com/c/81382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-25 19:09:11 +00:00
Brian Wilkerson
721f70ce29
Convert fix tests to separate classes, part 3
...
Change-Id: I4b8ec67484aab323e8bd7d51d4fe58c346914c2b
Reviewed-on: https://dart-review.googlesource.com/c/81420
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-25 16:57:03 +00:00
Paul Berry
2e2c360371
Merge commit '0b15595913ff89d8486e6677af0254dd6feab350' into analyzer
2018-10-24 06:09:47 -07:00
Dan Rubel
4f2a4e69a8
new convert-to-int-literal assist
...
Change-Id: I25f08d82fd4afaba485059e558536b37855bb6c9
Reviewed-on: https://dart-review.googlesource.com/c/81301
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-23 20:29:27 +00:00
Brian Wilkerson
fbe7d10a51
Move the fix tests into separate classes, part 2
...
Change-Id: Ic3a1d6d806a733dfc08d4f4e2c5554b1a4acd394
Reviewed-on: https://dart-review.googlesource.com/c/81300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-23 17:55:10 +00:00
Paul Berry
5665636983
Merge commit '7fd78ed5b606e64d30ec201de9adce6fdf8856ba' into analyzer
2018-10-22 13:07:24 -07:00
Danny Tuppeny
9c3834d41c
Remove unused import that shows a warning
...
Change-Id: Icc044234df59a2e1e148a531df59e952a221c8a3
Reviewed-on: https://dart-review.googlesource.com/c/81005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-10-22 14:31:34 +00:00
Brian Wilkerson
330abc9eb1
Split out first set of fix tests
...
Change-Id: Iddba4f4e9f86153277a17bb48bfbd9acf5a21d41
Reviewed-on: https://dart-review.googlesource.com/c/80986
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-22 02:31:03 +00:00
Konstantin Shcheglov
02651515eb
Fix identifyWidgetExpression() for Flutter.
...
Probably a bit pessimistic approach, allow only cases that we know
to be valid and useful.
R=brianwilkerson@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/2714
Change-Id: I8835c03d919c1f00a986ff3ef677c7f69995682f
Reviewed-on: https://dart-review.googlesource.com/c/80985
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-21 21:12:13 +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
Brian Wilkerson
4e36069271
Add fixes for missing implementation of a superclass constraint
...
Change-Id: I5ea1e961dbb98c034131c15d1945f21bcfa0df1d
Reviewed-on: https://dart-review.googlesource.com/c/80980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-21 15:03:16 +00:00
Brian Wilkerson
20c75ccfb1
Remove more dead code from server
...
Change-Id: I20689dc5fefd3a636f78b38929a886ea96d01e0f
Reviewed-on: https://dart-review.googlesource.com/c/80961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-20 00:30:51 +00:00
Paul Berry
fe5467092a
Merge commit '7a3762d4a91aed0b3885259b297953d0c38ce849' into analyzer
2018-10-19 10:00:38 -07:00
Brian Wilkerson
b35e717fae
Clean up the fix processor hierarchy
...
Change-Id: I2ca593397f061aa1cb0d91c98874451c8f53a206
Reviewed-on: https://dart-review.googlesource.com/c/80841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-19 16:21:23 +00:00
Danny Tuppeny
a502061c11
Add test and implementation for package: uris
...
Change-Id: Ibf114d83cade42ced7601befafec8a7e7c9f4bc7
Reviewed-on: https://dart-review.googlesource.com/c/78985
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-19 10:41:48 +00:00
Jaime Wren
2d397d1da6
Fix for dartbug.com/34821, variable_name_contributor.dart to complete "var SomeType |", to "someType" and "_someType", for declarations that can be denoted private.
...
Change-Id: I712ebc0f7a7288e1ace713f57b6694f0ed4874eb
Reviewed-on: https://dart-review.googlesource.com/c/80362
Commit-Queue: Jaime Wren <jwren@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-16 22:58:27 +00:00
Konstantin Shcheglov
a2a3c36b77
Switch CREATE_MISSING_OVERRIDES to writeOverrideOfInheritedMember() and using FunctionType signatures.
...
This fixes the issue, and simplifies code generation.
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/34729
Change-Id: I65928b5e68e44e4db77eb9c371aa1e6d27d66635
Reviewed-on: https://dart-review.googlesource.com/c/79468
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-12 20:45:42 +00:00
Brian Wilkerson
0e001641a9
Re-write invalid ASTs and update fix to reflect new AST structure for invalid type arguments on named constructors
...
Change-Id: I66e5f6b6022356eb31a327d1c989950c360492f7
Reviewed-on: https://dart-review.googlesource.com/c/79463
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-12 16:38:51 +00:00
Dan Rubel
e4c3fa0a9c
Improve recovery when parsing named constructor invocation with invalid type arguments
...
The parser now generates a ConstructorWithTypeArguments error and a new
handleInvalidTypeArguments event after a begin/endTypeArguments event pair
when those type arguments are in a syntatically invalid location.
For example: `new C.n<int>();` in
```
class C<T> { T f; C.n() {} }
main() { var x = new C.n<int>(); }
Most listeners handle this event by dropping the invalid type arguments,
but AstBuilder now preserves those invalid type arguments in the AST
to support better code quick-fixes/quick-assists/refactoring.
Change-Id: I5b22bd4903cd9ee3645936b9a108598b603cf9ca
Reviewed-on: https://dart-review.googlesource.com/c/79300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-10-11 19:57:22 +00:00
Brian Wilkerson
f11e746c2e
Initial implementation of fixes for type arguments on named constructor invocations
...
Change-Id: I71fe90c53c5a15e7172bcc27abfbfffd8119d7ff
Reviewed-on: https://dart-review.googlesource.com/c/79061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-10 17:11:36 +00:00
Danny Tuppeny
be39eacf00
Rename convertPathForImport -> convertAbsolutePathToUri
...
Also remove any calls that aren't required. The function still works if you pass it a relative path (for convenience, if you have a variable) but it's not required for relative paths.
Change-Id: I567e098f5956a7c2b5fe2d6d7d7fb16a263a72cc
Reviewed-on: https://dart-review.googlesource.com/c/79025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-10-10 16:03:58 +00:00
Danny Tuppeny
3d06427075
Fix MOVE_FILE test paths for Windows
...
- Wrap all paths with separators in convertPath() for Windows
- Ensure convertPathForImport does the right thing for relative paths
- Use the correct convertPath for imports/exports/parts
Change-Id: Ie95e41686479f175c9ba661180fdf5ad90b409e8
Reviewed-on: https://dart-review.googlesource.com/c/78740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-10-09 15:00:07 +00:00
Dan Rubel
b6a8e31492
Improve error message when var is used as a type name
...
... and Address comments in
https://dart-review.googlesource.com/c/sdk/+/78101
Change-Id: I8b3bc9888185d9802a389baa3f197f9b29927b7f
Reviewed-on: https://dart-review.googlesource.com/c/78103
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-05 11:56:26 +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
Danny Tuppeny
878779e1a2
Fix test and add TODO for others that need updating
...
Change-Id: I381f442ec7ac5f5c69901c70e6a33dfd196d56b4
Reviewed-on: https://dart-review.googlesource.com/c/77884
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-10-03 19:44:40 +00:00
Danny Tuppeny
2dfe46fba2
Additional work on MOVE_FILE and associated tests
...
- Update outgoing part-of relative uris (may need changing)
- Add a helper for verifying failed refactor statuses
- Use the original file location for checking if in an analysis root
- Remove tests for functionality we're not yet supporting
- Remove forced failures and @failingTest for tests that work
Bug: https://github.com/dart-lang/sdk/issues/33605
Change-Id: I405bfcb92ce2ce66710caf934fc03e10eb66aea3
Reviewed-on: https://dart-review.googlesource.com/c/77541
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-03 14:22:11 +00:00
Brian Wilkerson
bd7b776bb4
Fix more quick fix tests
...
Change-Id: I07c9900be8dc3510d729f77b98c95acd06159043
Reviewed-on: https://dart-review.googlesource.com/c/77671
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-03 00:16:15 +00:00
Brian Wilkerson
edd86ef7a1
Generate quick fix for await in non-async (issue 34647)
...
Change-Id: Iabf8f11c8c477d1642e5122a5748b04bcdc5efa3
Reviewed-on: https://dart-review.googlesource.com/c/77669
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-02 20:46:36 +00:00
Brian Wilkerson
72d3798764
Improved completion support for mixins
...
Change-Id: I77aea1b03e00725c48458b0e6ee9b1936ea5685c
Reviewed-on: https://dart-review.googlesource.com/c/77661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-02 18:27:33 +00:00
Konstantin Shcheglov
5cc9ab02a8
Switch all refactoring to using ResolveResult instead of raw unit.
...
R=brianwilkerson@google.com
Change-Id: I3fa7c5c22966dd5d464e438e9300587d80c180b2
Reviewed-on: https://dart-review.googlesource.com/77267
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-01 01:17:58 +00:00
Dan Rubel
7c46a28505
Update convert class to mixin assist to remove "abstract"
...
Change-Id: I27ff36228b6c93d13a2f6d5f0a4c15414c130687
Reviewed-on: https://dart-review.googlesource.com/77022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-09-27 21:07:03 +00:00
Konstantin Shcheglov
699282b5d3
Rename State class when StatefulWidget is renamed.
...
R=brianwilkerson@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/2545
Change-Id: I247db781e3b44910c823bb66d5f8773dc0d415cc
Reviewed-on: https://dart-review.googlesource.com/76080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-09-24 15:02:52 +00:00
Konstantin Shcheglov
2d53894e3f
Check that selection offset/length is valid in Extract Local refactoring.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/34475
Change-Id: Id2b44494a8464000180a8ca93cfcc770b256f59f
Reviewed-on: https://dart-review.googlesource.com/76063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-09-24 14:55:33 +00:00
Mike Fairhurst
71ad670754
Provide quickfixes for imprecise integer literals.
...
Important to do, I think, because its easy for computers and hard for
humans.
Change-Id: Ic8c770c6a99f004d29c2fd24bddb122a70aeba3f
Reviewed-on: https://dart-review.googlesource.com/75240
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-18 17:52:17 +00:00
Brian Wilkerson
6c712f157b
Add a fix to create a mixin
...
Change-Id: Id0f31949a5639a00e884abc61b2cfcb5bc552b44
Reviewed-on: https://dart-review.googlesource.com/75130
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-09-17 12:43:41 +00:00
Konstantin Shcheglov
c5d77d1d8b
Support mixins in more places in index and search.
...
R=brianwilkerson@google.com
Change-Id: I523726e1c7f5efa2d6e2f4b91204da3f14f181b6
Reviewed-on: https://dart-review.googlesource.com/75120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-09-16 17:40:16 +00:00
Brian Wilkerson
a80b13e2f9
Add an assist to convert from a class to a mixin
...
Change-Id: Id47de8ffe8c381973c5a4ca53f7459782e62d37f
Reviewed-on: https://dart-review.googlesource.com/74963
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-09-15 16:12:22 +00:00
Konstantin Shcheglov
7cf078c05d
Index and search for mixins.
...
R=brianwilkerson@google.com
Change-Id: I5399507dc5a9688ee5944f6554167a6b1e8692b6
Reviewed-on: https://dart-review.googlesource.com/72525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-31 21:38:26 +00:00
Brian Wilkerson
c22f0c6167
Add completion support for the new mixin syntax
...
Change-Id: I3a8744e03f32092c15f1e340e0ee6bef5245a859
Reviewed-on: https://dart-review.googlesource.com/72520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-31 16:59:18 +00:00
Konstantin Shcheglov
dbb1b2f4a6
Add 'Wrap with Container' quick assist.
...
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I860a3a92024b349153266fd9e70b56beea426ee2
Bug: https://github.com/flutter/flutter-intellij/issues/2566
Reviewed-on: https://dart-review.googlesource.com/72260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-30 21:47:32 +00:00