Commit Graph

25 Commits

Author SHA1 Message Date
Konstantin Shcheglov e3c8774543 Add AnalysisSession.analysisContext, stop using AnalysisDriver's AnalysisResult outside the driver.
Change-Id: I63138e002d9e777f51d2d843f7ef2b1f32fed3e0
Reviewed-on: https://dart-review.googlesource.com/c/82529
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-11-02 14:16:31 +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
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
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
Brian Wilkerson 87f753dbd3 Replace some declarations of element with declaredElement
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-02 16:00:36 +00:00
Brian Wilkerson f6d2c2378a Add awaits in async methods to restore previous semantics
Change-Id: I7711cd878a31df0fb0c92572e2256c0a26923640
Reviewed-on: https://dart-review.googlesource.com/59480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-08 19:58:07 +00:00
Konstantin Shcheglov 6e25b9b2d3 Add flutter.getChangeAddForDesignTimeConstructor to API.
R=brianwilkerson@google.com

Change-Id: I91e40c447d32e603026de337ec2d36983174a8cd
Reviewed-on: https://dart-review.googlesource.com/49826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-06 02:40:00 +00:00
Konstantin Shcheglov a6bd6fe047 Fix for generating forDesignTime(), must be factory.
R=brianwilkerson@google.com

Change-Id: Ie4a81511f52ee883da458ae9c029cc619013a433
Reviewed-on: https://dart-review.googlesource.com/49825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-06 02:12:00 +00:00
Konstantin Shcheglov 618077cfee Implement FlutterCorrections.addForDesignTimeConstructor().
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1318020e9feab79ac1403e5d76c7e15483fc9a8e
Reviewed-on: https://dart-review.googlesource.com/49545
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-04 22:27:25 +00:00
Konstantin Shcheglov 633b2ccb38 Add 'isWidgetClass' and 'stateClassName' to FlutterOutline.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Idf7a986a67321b3ed33bb5d3bd4c139fac995474
Reviewed-on: https://dart-review.googlesource.com/48260
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-25 20:22:26 +00:00
Konstantin Shcheglov 91d3c02d19 Rewrite relative URIs in instrumented Flutter outline code.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I33e73400643d77eb7c2b105eae918f4997e7d55d
Reviewed-on: https://dart-review.googlesource.com/46920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-16 16:52:40 +00:00
Konstantin Shcheglov 64e092d4a3 Add fields codeOffset/codeLength to FlutterOutline.
R=brianwilkerson@google.com

Change-Id: I917a780704882fcd7537a9334febc21098aabd4f
Reviewed-on: https://dart-review.googlesource.com/46579
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-15 21:01:14 +00:00
Konstantin Shcheglov 6b44182344 Only widgets in libraries can be rendered.
Technically we could eventually implement rendering widgets in parts,
but this is probably rare situation, and IntelliJ plugin does not
handle this case yet.

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I734eb5f5b26c386780a776f652366bd4d21125f9
Reviewed-on: https://dart-review.googlesource.com/45361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-06 18:02:39 +00:00
Konstantin Shcheglov be87175fee Implement Flutter Outline rendering API.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I7cbb4c0be7656ba1e684e8864348e6f1af54efae
Reviewed-on: https://dart-review.googlesource.com/45140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-06 16:33:34 +00:00
Konstantin Shcheglov 6189b9a360 Change Flutter Outline API to provide full instrumented code instead of edits.
This solves potential consistency problem between Analysis Server and IDE.

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1403af1c90d7fec2ff18ffdb862f2209b19e548e
Reviewed-on: https://dart-review.googlesource.com/45124
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-05 22:46:19 +00:00
Konstantin Shcheglov 3a5be046bb Update FlutterOutline API to provide widgets instrumentation.
So, this is alternative approach - the plan is to instrument in Analysis
Server, then generate the entry point and instrumented code in Flutter
plugin, and run flutter_tester also from the plugin.

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I6b2bb0fea6494df6b9f6b3e69e7548d03af7e94b
Reviewed-on: https://dart-review.googlesource.com/44382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-28 23:02:53 +00:00
Konstantin Shcheglov 223eeb2ebe Always shorten function expressions, list/map literals, multiline values.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/1762
Change-Id: I742ac6cb0ebbdde78f1326c5e07775d94e335d42
Reviewed-on: https://dart-review.googlesource.com/40560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-12 19:15:05 +00:00
Konstantin Shcheglov 330ad8d287 Fix for NPE when an argument does not correspond to a constructor parameter.
R=brianwilkerson@google.com

Change-Id: I97ba245398e4375e0e132cc3280db0357859e494
Reviewed-on: https://dart-review.googlesource.com/40104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-08 21:38:57 +00:00
Konstantin Shcheglov fb9b24a8cc Shorted MethodInvocation as outline labels.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I9056b9116ad50b2d9cddc38895e17d53c010d934
Reviewed-on: https://dart-review.googlesource.com/38921
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-06 01:27:56 +00:00
Konstantin Shcheglov 8871ffbae1 Include generic label into Flutter outlines.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I98f96b38839bf339080144f2dc1f4f8dc9f3126f
Reviewed-on: https://dart-review.googlesource.com/38840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-05 20:46:27 +00:00
Konstantin Shcheglov f771476eec Record variable name in FlutterOutline, fix for named attributes.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Ie91b21f464eaa43d811d51e50f7a6b479406f9da
Reviewed-on: https://dart-review.googlesource.com/36980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-26 17:54:45 +00:00
Konstantin Shcheglov 32cfb6a9e3 Implement wrapping Widget into some single-child container.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: If6f393c0eb80ba2fb670eda19ff7dfde845e2f73
Reviewed-on: https://dart-review.googlesource.com/36780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-25 22:21:11 +00:00
Konstantin Shcheglov 6393a247fc Add support for boolean/integer attributes.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I574931e558d45370c33a1d7626e17b5fb5e60480
Reviewed-on: https://dart-review.googlesource.com/36561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-24 05:49:35 +00:00
Konstantin Shcheglov 402af4db46 Add a new experimental 'flutter' domain and move FLUTTER_OUTLINE there.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I8f829f10a630e38c5a3f1638d077e37832a08daa
Reviewed-on: https://dart-review.googlesource.com/36320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-23 00:57:55 +00:00
Konstantin Shcheglov 07367d05cd Basic implementation of FlutterOutlineComputer.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I22c96c2a35c086814aace13f0121cc0361f3386f
Reviewed-on: https://dart-review.googlesource.com/36140
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-21 18:12:58 +00:00