Commit Graph

292 Commits

Author SHA1 Message Date
Konstantin Shcheglov 7d2447d795 Replace computeNode() with AstProvider in search.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2672973002 .
2017-02-03 10:40:44 -08:00
Konstantin Shcheglov f600f5f9de Stop using Element.computeNode() in refactorings and fixes.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2669353002 .
2017-02-02 17:24:31 -08:00
Konstantin Shcheglov fcd5f16d10 Stop using SDK summary bundle. Analyze dart:xxx as any other libraries.
Unfortunately this makes runnings tests about 30% slower :-(

I suspect that's because we have to build unlinked and linked summaries
for SDK libraries again and again for every tiny test.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2653683004 .
2017-01-24 18:32:26 -08:00
Konstantin Shcheglov a483610a96 Issue 28386. Implement search for potential usages with the new analysis driver.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28386

Review-Url: https://codereview.chromium.org/2653493006 .
2017-01-23 14:07:01 -08:00
Konstantin Shcheglov 12bdc9eb95 Fix code for @failingTest refactoring tests.
We should have used 'super.name()'.
Some tests are now passing.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2619623002 .
2017-01-06 13:53:36 -08:00
Konstantin Shcheglov 188c087036 Run 'Inline Method' refactoring tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2619053002 .
2017-01-06 13:51:02 -08:00
Konstantin Shcheglov d6fdc65220 Run 'Rename Library' refactoring tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614903006 .
2017-01-06 12:33:23 -08:00
Konstantin Shcheglov 429379045b Run rename-import tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617213002 .
2017-01-06 11:35:29 -08:00
Konstantin Shcheglov 31c7cce275 Run refactoring tests with the new analysis driver.
There are some failures because of missing potential search results.

These tests are not updated yet because they have too many problems now.

inline_method_test.dart
move_file_test.dart
rename_import_test.dart
rename_library_test.dart

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618993003 .
2017-01-06 10:49:34 -08:00
Konstantin Shcheglov d2f48ccf58 Make subclasses of AbstractContextTest asynchronous.
As a preliminary step before duplicating them for the new analysis driver.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614033003 .
2017-01-05 14:21:29 -08:00
Konstantin Shcheglov 2537784f92 Stop using Element.unit directly.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2541873002 .
2016-11-30 09:37:55 -08:00
Konstantin Shcheglov 0f9a78ff53 Make 'Inline Method' refactoring work with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2540793003 .
2016-11-29 17:12:46 -08:00
Konstantin Shcheglov 3319e6d0e3 Fix for inlining async methods/getters.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2463493002 .
2016-10-31 08:48:37 -07:00
Konstantin Shcheglov 05a86a7495 Remove 'initializeTestEnvironment' from 'analysis_server'.
Also fixes the server_options_test.dart:22 test broken in https://codereview.chromium.org/2394683006/

R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2402483002 .
2016-10-06 10:26:17 -07:00
Konstantin Shcheglov de4d8b3a78 Switch analysis_server to use 'package:test'.
I'm changing DEPS in the corresponding analyzer CL.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2394683006 .
2016-10-06 08:47:15 -07:00
Konstantin Shcheglov 5a4d7ebf61 Issue 27475. Discourage users from naming constructors the same as the enclosing classes.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27475

Review URL: https://codereview.chromium.org/2399533003 .
2016-10-05 12:07:40 -07:00
Brian Wilkerson ab9ba20c04 Fix recently introduced strong-mode errors
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -07:00
Konstantin Shcheglov e346689805 Issue 27179. Materialize synthetic constructors on rename.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27179

Review URL: https://codereview.chromium.org/2289823002 .
2016-08-29 08:52:13 -07:00
Konstantin Shcheglov 424cb8d9a4 Fix for 'Extract Local' in an expression function body.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2267893002 .
2016-08-22 11:58:08 -07:00
Konstantin Shcheglov 30b2401907 Issue 25666. Add test for shadowing of a superclass member from other library.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25666

Review URL: https://codereview.chromium.org/2204263002 .
2016-08-03 10:16:36 -07:00
Konstantin Shcheglov a3b1936567 Fix for SearchEngine.searchMemberDeclarations() - search exact names.
R=pquitslund@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2183263002 .
2016-07-26 14:47:32 -07:00
Konstantin Shcheglov daed53916a Issue 26207. Fix for renaming top-level functions with offset 0.
They were indistinguishable from the corresponding enclosing units.
Now we use a separate kind for units and libraries.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26207

Review URL: https://codereview.chromium.org/1896023005 .
2016-04-19 15:36:28 -07:00
Brian Wilkerson 8c22a5f807 Format code in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1838933003 .
2016-03-29 08:27:14 -07:00
Konstantin Shcheglov 8398960fb1 Fix visible range of local variables in 'for' loops.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1798223002 .
2016-03-14 14:43:15 -07:00
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07:00
Konstantin Shcheglov feae2ba7c9 Fix the imported package library move test.
Files in package lib/ folders have package: URI scheme, so the test
should use it too.

This CL finishes fixing tests that were failing with the new index.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1800683002 .
2016-03-14 09:05:37 -07:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Konstantin Shcheglov 76f4578af8 Start using the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1786013004 .
2016-03-11 14:02:37 -08:00
Konstantin Shcheglov 28f8a64210 Remove SearchEngine.searchElementDeclarations().
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1769063002 .
2016-03-07 09:57:15 -08:00
Konstantin Shcheglov b0c06a5827 Issue 25616. Support for extracting methods with function-typed parameters.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25616

Review URL: https://codereview.chromium.org/1655353002 .
2016-02-02 14:32:02 -08:00
Konstantin Shcheglov fe7a48d6c7 Isse 25404. When remove a method during inlining, remove also leading empty lines.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25404

Review URL: https://codereview.chromium.org/1628623002 .
2016-01-22 19:40:38 -08:00
Konstantin Shcheglov 5237561075 Issue 25404. 'Inline Method' should update implicit 'this' and class references.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25404

Review URL: https://codereview.chromium.org/1629533003 .
2016-01-22 17:21:57 -08:00
Konstantin Shcheglov 78ae012d2d Issue 25313. Skip constructor names and named expressions.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25313

Review URL: https://codereview.chromium.org/1547113002 .
2015-12-27 12:05:05 -08:00
Konstantin Shcheglov 70cd905c4d Issue 25253. Improve collecting names that may conflict with the extracted local variable.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25253

Review URL: https://codereview.chromium.org/1528013004 .
2015-12-15 12:26:11 -08:00
Konstantin Shcheglov f71ae984a9 Issue 25252. Stop collecting covering expressions at void invocations.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25252

Review URL: https://codereview.chromium.org/1528023002 .
2015-12-15 09:55:48 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Konstantin Shcheglov b44ed3e91e Issue 25251. Fix for extracting string literal part with zero length.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25251

Review URL: https://codereview.chromium.org/1522193002 .
2015-12-14 12:56:59 -08:00
Konstantin Shcheglov b05ae45575 Extract Local refactoring: provide a linked edit group for the name.
This will support in-place rename after extract in IDEA.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1502183007 .
2015-12-08 15:27:05 -08:00
Konstantin Shcheglov dd9ad7e015 Skip assignments and argument lists.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1496363002 .
2015-12-04 11:43:39 -08:00
Konstantin Shcheglov 767b57bafd Extract Local refactoring: skip method names in invocations.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1498523005 .
2015-12-03 15:19:36 -08:00
Konstantin Shcheglov 128250a9ea Compute covering offsets/lengths.
Drop support for binary expressions fragments.

Reduce number of reported problems, provide best guess results instead.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1431673003 .
2015-11-02 18:22:12 -08:00
Konstantin Shcheglov 586a1f359a Fix for renaming (an invalid) ClassElement invocation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1385403007 .
2015-10-12 12:21:12 -07:00
Konstantin Shcheglov 2bbb40d0e2 Warn about conflict before renamed class member and enclosing class name.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1398213004 .
2015-10-12 12:10:12 -07:00
Konstantin Shcheglov 307438d582 Return 'null' rename refactoring in case of a null element.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1397403002 .
2015-10-12 10:44:31 -07:00
Brian Wilkerson 9ad256cf18 Move the wire protocol support into the public API
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398293002 .
2015-10-11 07:34:28 -07:00
Konstantin Shcheglov c06ad0db30 Issue 24420. Don't allow renaming in pub packages.
There are no ideal solution for this.
But all our users want it somehow.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24420

Review URL: https://codereview.chromium.org/1380253003 .
2015-10-02 13:09:55 -07:00
Konstantin Shcheglov 5bc38481a7 Report a fatal error on attempt to rename an element declared in SDK.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1377623002 .
2015-09-28 14:00:13 -07:00
Konstantin Shcheglov 4f8649f1b3 Issue 24442. Fix for renaming library names with spaces.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24442

Review URL: https://codereview.chromium.org//1370793003 .
2015-09-25 13:55:13 -07:00
Konstantin Shcheglov 6899986bfe Use TypeSystem in the 'Extract Method' refactoring.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1364803003 .
2015-09-23 10:28:50 -07:00
Konstantin Shcheglov 4aa6466ccb Use IndexContributor(s) in LocalIndex.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1359113002 .
2015-09-23 08:17:33 -07:00