Commit Graph

1005 Commits

Author SHA1 Message Date
Konstantin Shcheglov 6469f4c78a Support for extracting widget from a function.
R=brianwilkerson@google.com

Change-Id: I2775ac681f14d26d96a872aae98c473062d47305
Reviewed-on: https://dart-review.googlesource.com/47380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-20 23:29:19 +00:00
Konstantin Shcheglov 8abeb56ebb Basic 'Extract Widget' refactoring.
Only a widget creation expression can be extracted.

Not exposed through Analysis Server API.

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

Change-Id: I6a47cc1851d69b54a2812bd6a5320c287d5b9eae
Reviewed-on: https://dart-review.googlesource.com/47360
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-20 21:24:56 +00:00
Brian Wilkerson 746c2557a2 Correctly handle casts of Set in quick fix
Change-Id: I00067a03b41cc0ace16501fc21b990b91ea0af61
Reviewed-on: https://dart-review.googlesource.com/46944
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-17 14:55:38 +00:00
Brian Wilkerson f6f1327fbe Add a fix to add an explicit cast
Change-Id: Ib27b2609cce14ea6d7c1666388c653e757b82a64
Reviewed-on: https://dart-review.googlesource.com/46881
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-16 16:43:58 +00:00
Konstantin Shcheglov 2881ebcd78 Fix for lint non_constant_identifier_names.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32488
Change-Id: I76580a581845d8c6d3c8003b6b0f631a5fc40cdb
Reviewed-on: https://dart-review.googlesource.com/46822
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-15 22:44:44 +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 693390a776 Index and search implicit references to optional positional parameters.
R=brianwilkerson@google.com

Change-Id: Icf5f48118aeccbc137f125f9e730c9fe84200063
Reviewed-on: https://dart-review.googlesource.com/45922
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 23:23:49 +00:00
Brian Wilkerson 8d47a6e86f Add a fix for lints that recommend using final (issue 32473)
Change-Id: I9ba38998e99c6102c0b69a2a3f8427416d087f2e
Reviewed-on: https://dart-review.googlesource.com/45900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-09 22:09:18 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Konstantin Shcheglov 215aa21172 Boost completion relevance for more cases.
R=brianwilkerson@google.com

Change-Id: Ib5fe69d3a0d20e29f36575e692a7418b6744ca83
Reviewed-on: https://dart-review.googlesource.com/44281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-28 19:32:56 +00:00
Konstantin Shcheglov 4cf5b7df12 Boost relevance for compatible types in '==' and switch/case.
Probably less Flutter specific, but still useful.

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

Change-Id: I979e1a0640494a4a6cbedcec90781bc165c94f31
Reviewed-on: https://dart-review.googlesource.com/44000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-27 17:36:40 +00:00
Brian Wilkerson 716daa3b0d Add assists to convert between literal string styles
Change-Id: I691ff29d0bdc5a01cef6736f403025d1eee912d0
Reviewed-on: https://dart-review.googlesource.com/43580
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-02-24 21:45:32 +00:00
Konstantin Shcheglov 9567305bd6 Set selection position for Flutter move widget up/down assists.
This requires also changes to Dart plugin for IntelliJ, because currently
we use exit position only when there are linked edits. I attempted to
implement it myself, it mostly works, but there are race condition
complications.

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

Change-Id: Iff1a79ebb0cb7e0eabfe59e45d8dde7559c60a0f
Reviewed-on: https://dart-review.googlesource.com/43600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-24 17:14:30 +00:00
Konstantin Shcheglov 316af55593 Suggest enum constants for imported enums.
So, you can complete `Column(crossAxisAlignment: ^)` and get all of
the CrossAxisAlignment right away for selection. Or you can start
typing `center` and by the time when you typed first letters, you get
several completion suggestions. There are several enums with `center`,
but because we give compatible types higher relevance, the correct
one is always the first.

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

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: I6c2082668c6b25bf23e070915b5df03081ff0d5c
Reviewed-on: https://dart-review.googlesource.com/43485
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-23 19:26:36 +00:00
Konstantin Shcheglov cc3e062578 Set higher relevance for exact type and subtype completions.
Exact type get the largest relevance boost, subtypes a smaller boost,
and the rest has default relevance for its element kind.

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

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: Ibb38caedc314e9cf476de2116aeb61bcec8c8a08
Reviewed-on: https://dart-review.googlesource.com/43263
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-23 06:05:13 +00:00
Brian Wilkerson cbacb35d51 Fix selection range from override contributor and contribute when there is a leading annotation
Change-Id: If43dd85531d1c9cdcba0f750b299990c10991538
Reviewed-on: https://dart-review.googlesource.com/43140
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 20:22:29 +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 c840168ef2 Fix CombinatorContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I198378b707df36852d4d7a90f98e4542b95c218c
Reviewed-on: https://dart-review.googlesource.com/42944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 17:53:26 +00:00
Danny Tuppeny 5da95d7c9f Fix AssistProcessorTest on Windows
Note: This fixes one of the tests but the other still fails. I believe
that's because of https://github.com/dart-lang/sdk/issues/32278 and
should pass once that issue is fixed.

Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I6469b75de39e6476353da303c9c72cfba2da922e
Reviewed-on: https://dart-review.googlesource.com/43006
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 17:37:11 +00:00
Danny Tuppeny 6074dcfdae Fix LibraryPrefixContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I7073e516109570ca80b1890368351e22b9ed844f
Reviewed-on: https://dart-review.googlesource.com/43004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 17:10:38 +00:00
Danny Tuppeny 82a1702cc8 Fix OverrideContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I68f0691007820e5efbabca58b6436d0c68d81487
Reviewed-on: https://dart-review.googlesource.com/43005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 17:05:43 +00:00
Danny Tuppeny f94a0f54e6 Fix CommonUsageSorterTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: Ie90a0b8823816d8b64f261e561183c35fb1737c8
Reviewed-on: https://dart-review.googlesource.com/43001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 16:56:03 +00:00
Danny Tuppeny 812b635ea3 Fix CompletionManagerTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I6b521604141b4584c4ed17470e7ea25b060af841
Reviewed-on: https://dart-review.googlesource.com/43003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 16:51:53 +00:00
Danny Tuppeny 6437794e32 Fix LocalLibraryContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: Ie57904d6eac2eabe8538400b4e56b2c414aebb35
Reviewed-on: https://dart-review.googlesource.com/42921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 16:39:43 +00:00
Danny Tuppeny e7d57c8535 Fix RenameClassMemberTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I57804f6c168cccdbfee62f8fa6b60b40f260015b
Reviewed-on: https://dart-review.googlesource.com/42946
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 16:17:33 +00:00
Danny Tuppeny 04830ac262 Fix RenameUnitMemberTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I98f2c5025615adf52919ea87d637a47ee50fe760
Reviewed-on: https://dart-review.googlesource.com/42942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 16:11:53 +00:00
Danny Tuppeny 9e96a89628 Fix NamedConstructorContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I47d47bf7275f4e78d6e077d5f2c1e0ec4246c150
Reviewed-on: https://dart-review.googlesource.com/42943
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 16:06:03 +00:00
Danny Tuppeny 0796ea4ee5 Fix RefactoringLocationTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: Ieead4b1d434740078a6383cafb426ddc4bbe002b
Reviewed-on: https://dart-review.googlesource.com/42941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 15:51:33 +00:00
Danny Tuppeny 1c44401f2e Fix LocalReferenceContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I75a3b5200f6ef06c3c14233d45c897ae8bdd655c
Reviewed-on: https://dart-review.googlesource.com/42923
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 15:46:23 +00:00
Danny Tuppeny 427506d1f0 Fix LibraryMemberContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I53c12fc79d0d5bf9331eb42714d7a6c29a5325af
Reviewed-on: https://dart-review.googlesource.com/42940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 15:36:43 +00:00
Danny Tuppeny 6a82f29e32 Fix ArgListContributorTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I04faca9575387faeca1cf6b505f05c15a1b0e670
Reviewed-on: https://dart-review.googlesource.com/42920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 15:29:36 +00:00
Konstantin Shcheglov 0346acf550 Don't suggest generative constructors of abstract classes.
So, we don't suggest EdgeInsetsGeometry for 'padding: ', even though
it is the type of the parameters. But we still suggest its subclasses
EdgeInsets and EdgeInsetsDirectional.

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

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: If2d7ba550ec76e4f66cb81e1346466b5f1a30464
Reviewed-on: https://dart-review.googlesource.com/42888
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 02:03:33 +00:00
Konstantin Shcheglov fcccab9199 Filter constructor completions by required type.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: I88eb345bfa7f0a65d135e5fdcb443d5dadd695c5
Reviewed-on: https://dart-review.googlesource.com/42882
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-21 23:12:31 +00:00
Konstantin Shcheglov ebd16bd33f New Quick Fix 'Convert to named arguments'.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/1100
Change-Id: I317204424c38313c8c3eb844d9e8bb574118aa66
Reviewed-on: https://dart-review.googlesource.com/42860
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-21 20:07:09 +00:00
Danny Tuppeny 23127d04b6 Fix test_ArgDefaults_function_with_required_named test on Windows
The changes in addSource are so that the driver gets the convertedPath
(newFile already converts).

The change in the test is to format a path for importing on Windows - it
seems that importing a file with an absolute path is a bit wonky on
Windows (I presume since this is testing imports it's using absolute
paths for a reason).

The helper in the Mixin is for doing the conversion from a Windows path
to an importable version of it (this has many questions to answer and
maybe already exists somewhere?).

See #32095.

Change-Id: Ifed137ac354f9d0527344020c719e0c3c81ccf3e
Reviewed-on: https://dart-review.googlesource.com/42681
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-21 18:49:19 +00:00
Danny Tuppeny d66e6b1c6e Fix refactoring tests on Windows
This hand-built JSON fails on Windows because the paths being inserted
only have a single slash ("C:\test.dart") but in the real results the
JSON is encoded correctly and hhas two paths.

This works around the issue by JSON-encoding the filename but really the
whole object should be serialised to JSON properly.

Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I8aa418e8e3e6377ed01fe3bbecc3242f3a012629
Reviewed-on: https://dart-review.googlesource.com/42742
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-21 18:49:12 +00:00
Danny Tuppeny 358a8502fd Fix UriContributorTests on Windows
See #32226.

Change-Id: I685b0b5875001a56af5c3cf623fe9bca7261b478
Reviewed-on: https://dart-review.googlesource.com/42740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-21 17:56:59 +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
Danny Tuppeny 40e3f9addc Convert paths for mock SDK libraries to fix tests on Windows
The other lines on this method are calling `provider.convertPath` around their paths but these ones do not, which is causing almost all analysis server tests to fail on Windows (for me - I can't explain them not
failing builds). This causes the hard-coded paths like `/lib/core/core.dart` to be fixed up to `C:\lib\core\core.dart` which is what the server is looking for (because at the other end the paths *have* been fixed up).

See #32226.

Closes #32230
https://github.com/dart-lang/sdk/pull/32230

GitOrigin-RevId: 1adeee23f8ac8efc8acf61caf5f769e4ec44c030
Change-Id: Id9bf195967db0912c6f4b67bd79d504e627b8aab
Reviewed-on: https://dart-review.googlesource.com/42300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-20 18:55:38 +00:00
Brian Wilkerson ed88a91f62 Generate an import fix when an undefined function might be a constructor invocation
Change-Id: I1cc98cb14d66db6b241e2a5b008f45881c41d13b
Reviewed-on: https://dart-review.googlesource.com/42340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-19 22:03:22 +00:00
Konstantin Shcheglov ded8dd2ad3 Don't add explicit 'new' when previewDart2.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/dart-lang/sdk/issues/32175
Change-Id: I05c5845a6e511698833045f99716231974e57b61
Reviewed-on: https://dart-review.googlesource.com/42320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-19 19:51:44 +00:00
Brian Wilkerson b48c12a000 Use the selection computed by the builder in the override contributor
Change-Id: I85b7700bc137388d878c66282660df0d4b8d95af
Reviewed-on: https://dart-review.googlesource.com/42100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-16 20:52:52 +00:00
Konstantin Shcheglov b17ac68b60 Add <Widget> type arguments for wrapping with Column/Row.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I6e8ee33c453e552965d14ecb95391eb55b7b0bc6
Reviewed-on: https://dart-review.googlesource.com/42025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-16 18:45:17 +00:00
Brian Wilkerson 0501c740ac Member overrides invoke the overridden member and the display label uses ellipses
Change-Id: I9cb2db1514a8a2798cb3ec69d3d71047573a8dd4
Reviewed-on: https://dart-review.googlesource.com/41903
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2018-02-16 14:12:27 +00:00
Konstantin Shcheglov 7d0877dbf6 Remove unused methods in assist/fix tests.
R=brianwilkerson@google.com

Change-Id: I6aa5ef067bb3cee4cbd8ffc01bf60bf0637f773e
Reviewed-on: https://dart-review.googlesource.com/41880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-15 19:13:35 +00:00
Konstantin Shcheglov 1e999ed9fe It is OK to inline Column with a single item in 'children' into a 'child'.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Ifa2a300b2735ab635bbaeeee08ce21ad8a7db9b7
Reviewed-on: https://dart-review.googlesource.com/41901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-15 18:25:57 +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 425e07d721 If selection in 'Extract Method' does not cover any node, extract the smallest covering expression.
Two comments.

1. We need also to change the Dart plugin for IntelliJ to not select
   the whole line when selection if empty. The whole line is almost
   never a good choice for Flutter.

2. This is not fully consistent with "Extract Lolal" where we give the
   client the list of possible expressions to extract and the user can
   then choose. Here we use just the smallest one. If we want to make
   it consistent, we will need to enchance the protocol and the plugin.

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

Change-Id: I87a752234d9c825d78a6d787d2b21d1b252166c2
Reviewed-on: https://dart-review.googlesource.com/41520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-14 20:43:13 +00:00
Konstantin Shcheglov b5cb793fbd Convert unresolved 'children:' into 'child:'.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I3ea3f8a8be2e942a3fd00060519a7dbfeae6fb36
Reviewed-on: https://dart-review.googlesource.com/41481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-14 20:23:43 +00:00
Konstantin Shcheglov 4232ac99e8 Fix for surround-with linked edit positions.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32106
Change-Id: Ia899171aa38dd1283b72cdd100a0f5b678e9b565
Reviewed-on: https://dart-review.googlesource.com/41420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-14 18:55:33 +00:00