Commit Graph

751 Commits

Author SHA1 Message Date
Steve Messick b3ed30b822 Add assists to move Flutter widgets up and down one level.
Fixes:
https://github.com/flutter/flutter-intellij/issues/461

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2724473002 .
2017-02-27 15:03:51 -10:00
pq 174a50bb89 Missing @required arg quick fix improvements.
* fixes missing `HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS` case
* improve quick fix message (add name)
* update codegen

BUG=
R=scheglov@google.com

Fixes: #28830
Review-Url: https://codereview.chromium.org/2707223003 .
2017-02-22 06:43:43 -08:00
Steve Messick 2da528aeac Add assist to reparent a list of Flutter widgets
Apparently I forgot to sort the test file, so there's a bit of code rearrangement there.

I added the optimization to the filter from the previous CL here, too.

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

Review-Url: https://codereview.chromium.org/2701023002 .
2017-02-17 13:11:30 -08:00
Steve Messick 7945b65449 Add assist to reparent Flutter widget
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2701563003 .
2017-02-17 08:35:47 -08:00
pq e2808dff23 Add fix for missing @required params.
Groundwork for: https://github.com/flutter/flutter-intellij/issues/553

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

Review-Url: https://codereview.chromium.org/2692983003 .
2017-02-15 09:02:44 -08:00
Konstantin Shcheglov 663b7f665e Analysis.getHover should return the field's documentation for field formal parameters.
Also return the parameter's element with completion suggestion.

R=brianwilkerson@google.com
BUG= https://github.com/flutter/flutter-intellij/issues/385

Review-Url: https://codereview.chromium.org/2681233005 .
2017-02-10 08:49:40 -08:00
Konstantin Shcheglov 0a09ff53c3 Include the field documentation for named field formal parameter completion suggestions.
R=brianwilkerson@google.com, devoncarew@google.com
BUG= https://github.com/flutter/flutter-intellij/issues/385

Review-Url: https://codereview.chromium.org/2683233002 .
2017-02-09 13:24:25 -08:00
danrubel 1680c434f2 suggest method references in named expressions
Fix https://github.com/dart-lang/sdk/issues/25386

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2679503002 .
2017-02-06 12:59:05 -05:00
danrubel 02adcc9614 suggest catch and finally keywords
After a try block that does not have a "catch" block,
suggest the "catch" keyword and nothing else.
After a "catch" block, suggest the "finally" keyword.

Fix https://github.com/dart-lang/sdk/issues/27560

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2662973007 .
2017-02-06 12:57:57 -05:00
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
Dan Rubel f33c3c1676 complete named params in constructors
This add completion suggestions for named parameters
in constructors and factories, and prevents other suggestions
such as type names, identifiers, etc when they are not appropriate.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2671533002 .
2017-02-01 14:36:41 -05:00
Konstantin Shcheglov 75fff1fdb6 Implement completion in WithDirective.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2665053004 .
2017-01-31 15:06:54 -08:00
Janice Collins 93c3a194ad Better error message for missing async with await
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2662483003 .
2017-01-27 10:48:27 -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 5f6ea67c1e Make Analysis Server tests use MockSdk again.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2650803005 .
2017-01-24 13:49:48 -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 0160332713 Issue 28027. Move Null to the bottom in the Analyzer.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/28027

Review-Url: https://codereview.chromium.org/2638183002 .
2017-01-18 11:15:11 -08:00
Konstantin Shcheglov 8d326e9a14 Report StateError if the DartSDK for an AnalysisDriver does not have summary.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2639743002 .
2017-01-17 20:46:00 -08:00
Brian Wilkerson 22f561e914 Reapply "Add support for generic function type syntax, part 1"
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2622303006 .
2017-01-11 14:10:05 -08:00
Brian Wilkerson 85b1e7abbe Revert "Add support for generic function type syntax, part 1"
Review-Url: https://codereview.chromium.org/2624283003 .
2017-01-11 13:30:52 -08:00
Brian Wilkerson 1cd918533d Add support for generic function type syntax, part 1
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2613383003 .
2017-01-11 13:12:10 -08:00
Konstantin Shcheglov e80a54e432 Fix the rest of the completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618243002 .
2017-01-08 15:16:33 -08:00
Konstantin Shcheglov 0c4cc3fdaf Fix the last Quick Fix test.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2619633003 .
2017-01-06 16:37:12 -08:00
Konstantin Shcheglov 7fc5bc3634 Remove REPLACE_IMPORT_URI Quick Fix.
I decided that it is not so useful to worth adding special support
for it with the new analysis driver.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2616163002 .
2017-01-06 14:56:20 -08:00
Konstantin Shcheglov 0377beb128 Update 'Add final field formal parameters' Quick Fix to support the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618923003 .
2017-01-06 14:34:49 -08:00
Konstantin Shcheglov d5fc0cda3b Fix Quick Fix tests that used AnalysisContext.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615303002 .
2017-01-06 14:31:38 -08:00
Konstantin Shcheglov ea98b0db45 Fix the rest of Quick Assist tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2613123003 .
2017-01-06 14:08:51 -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 c7380f5d14 Run Quick Fixes tests with the new analysis driver.
There is a handful of failing tests though.
I fill triage them in subsequent CLs.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617833003 .
2017-01-06 09:27:04 -08:00
Konstantin Shcheglov 71fc176b9b Run class/member hierarchy tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618033002 .
2017-01-06 09:24:31 -08:00
Konstantin Shcheglov 4e49205c61 Run AssistProcessor tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617833002 .
2017-01-05 16:59:35 -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 e870bc9872 Fix for summarizing triple slash documentation comments.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615013003 .
2017-01-05 12:30:44 -08:00
Konstantin Shcheglov d8c426bb85 Fix for resynthesizing libraries with invalid part URIs.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615903003 .
2017-01-05 12:26:47 -08:00
Konstantin Shcheglov 9a3b6a09e5 Issue 28261. Add support for implementing generic methods in Quick Fix.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28261

Review-Url: https://codereview.chromium.org/2618653002 .
2017-01-05 08:32:03 -08:00
Konstantin Shcheglov 4f03cccf06 Fix part related completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2616493004 .
2017-01-04 15:06:10 -08:00
Konstantin Shcheglov 1e43b4f270 Replace using MockSdk with FolderBasedDartSdk + summaries in AbstractContextTest(s).
It has some performance penalty (about 2-3 seconds in 35 seconds total).

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

Review-Url: https://codereview.chromium.org/2610823004 .
2017-01-04 14:39:24 -08:00
Konstantin Shcheglov 20ca3e9b7e Enable several completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612103002 .
2017-01-04 14:23:18 -08:00
Konstantin Shcheglov f0a0b1fc79 Fix some completion tests with parts.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2573233002 .
2016-12-14 16:28:02 -08:00
Konstantin Shcheglov 8dbfef1cf1 Fix completion tests that attempted to resolve a library.
We don't need this with the new analysis driver.
The library element will be resynthesized on demand.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2571333002 .
2016-12-14 12:33:06 -08:00
Konstantin Shcheglov 63d1c18f41 Add completion tests for the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572203002 .
2016-12-14 12:05:20 -08:00
Konstantin Shcheglov 52c81e4a78 Fix for detecting lib/src. Sort fixes by relevance.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572013002 .
2016-12-14 06:57:19 -08:00
Konstantin Shcheglov 3a422bceb7 Implement SearchEngine.searchMemberDeclarations() for the new driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2566393003 .
2016-12-13 14:06:15 -08:00
Konstantin Shcheglov 142473b8cb Implement SearchEngine.searchTopLevelDeclarations() for the new driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572603003 .
2016-12-13 12:11:22 -08:00
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00