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>
2 files changed
tree: c0fe45bef55aaec69cca7141d1c628709ea2d9a2
  1. build/
  2. client/
  3. docs/
  4. pkg/
  5. runtime/
  6. samples/
  7. samples-dev/
  8. sdk/
  9. tests/
  10. third_party/
  11. tools/
  12. utils/
  13. .clang-format
  14. .gitattributes
  15. .gitignore
  16. .gn
  17. .mailmap
  18. .packages
  19. AUTHORS
  20. BUILD.gn
  21. CHANGELOG.md
  22. codereview.settings
  23. DEPS
  24. LICENSE
  25. PATENTS
  26. PRESUBMIT.py
  27. README.dart-sdk
  28. README.md
  29. WATCHLISTS
README.md

Dart

Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.

Using Dart

Visit the dartlang.org to learn more about the language, tools, getting started, and more.

Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.

Building Dart

If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.

There are more documents on our wiki.

Contributing to Dart

The easiest way to contribute to Dart is to file issues.

You can also contribute patches, as described in Contributing.

License & patents

See LICENSE and PATENTS.