Steve Messick
17360ffa6d
Add colon to switch cases and default
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2837063003 .
2017-04-25 11:13:54 -07:00
Steve Messick
8c2aae7dee
Fix detection of bad catch-clauses and try-statements
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2842523002 .
2017-04-24 12:00:14 -07:00
Steve Messick
00d04dda08
Add special completion for control-flow block exits
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2834913002 .
2017-04-21 14:51:45 -07:00
Steve Messick
6407af5dcb
Clean up TODOs
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2830793007 .
2017-04-20 15:19:16 -07:00
Steve Messick
b9c214f374
Compete try-statements
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2834513004 .
2017-04-20 13:09:23 -07:00
Steve Messick
0829174516
Complete for-each and switch statements
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2826283002 .
2017-04-19 14:44:41 -07:00
Steve Messick
6a19d96ee2
Complete for-statement
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2824233002 .
2017-04-18 15:20:31 -07:00
Steve Messick
b9f9ad24f1
Add completion for do-stmt, refactor for reuse
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2816943005 .
2017-04-17 10:56:26 -07:00
Steve Messick
eadc6af226
Statement completion framework with a few examples
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2803313002 .
2017-04-07 13:55:50 -07:00
pq
5a237935f0
Fix tests to verify defaultArgListString specified as null are null.
...
* introduces a sentinel default value to ensure that we know when asserting if `null` was specified or the result of an excluded optional arg
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2769223004 .
2017-03-24 11:53:00 -07:00
pq
4a9cabf493
Arglist children: default value gen fixes.
...
* fixed arglist codegen (include params)
* fixed defaultTextRange generation (and added tests)
* cleanup (followup from https://codereview.chromium.org/2768273003/
R=brianwilkerson@google.com , danrubel@google.com
See: https://github.com/flutter/flutter-intellij/issues/832
Review-Url: https://codereview.chromium.org/2771123002 .
2017-03-24 09:36:24 -07:00
pq
6f846bcd53
<Widget> boilerplate for Flutter children: suggestions.
...
Cleanup (tracked in TODOs) and consolidation to follow.
R=brianwilkerson@google.com , danrubel@google.com
See: https://github.com/flutter/flutter-intellij/issues/832
Review-Url: https://codereview.chromium.org/2768273003 .
2017-03-23 15:20:42 -07:00
pq
df06af12eb
Completion boilerplate for Flutter cons children (flutter-intellij#463)
...
* plumbs IDE options into completion requests
* simple POC test
More tests and a bit of cleanup to come.
R=brianwilkerson@google.com
See: https://github.com/flutter/flutter-intellij/issues/463
Review-Url: https://codereview.chromium.org/2771653002 .
2017-03-22 15:14:28 -07:00
Jacob Richman
a993294503
Format all analyzer packages
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2753923003 .
2017-03-16 16:11:43 -07:00
pq
cc0036d5ad
Calculate text ranges for default args.
...
Continued work on generating sensible default contents for args in completions.
Calculated text ranges allow us to produce linked edits in the IDE.
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2727343002 .
2017-03-02 13:14:49 -08:00
pq
d826b1f931
Default arg support continued (flutter-intellij#553).
...
Default arg support for:
* inherited refs
* imported refs
* type members
* local constructors
BUG=
R=brianwilkerson@google.com , scheglov@google.com
See: https://github.com/flutter/flutter-intellij/issues/553
Review-Url: https://codereview.chromium.org/2728653004 .
2017-03-01 15:00:47 -08:00
pq
d1bfe8bccb
Calculate default args for local reference completions.
...
First step towards wiring up default args for completions.
See: https://github.com/flutter/flutter-intellij/issues/553
Next up: similar enhancements for type_members, imported_refs, etc.
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2722253002 .
2017-03-01 11:45:01 -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
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
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
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
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
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
Paul Berry
ae6fd961a1
Prepare for decoupling analyzer ASTs from element model.
...
This CL creates top level accessor functions which may be used to map from AST data structures to their corresponding elements and types, and begins using those accessor functions throughout the SDK. It also adds empty interfaces ResolutionTarget and ResolutionType, which are implemented by Element and DartType respectively.
In a future CL, I will change the types stored in the AST to ResolutionTarget and ResolutionType, rather than specific element types; this will decouple the ASTs from the element model. The presence of the accessor functions will allow clients to continue accessing elements and types in a type-safe way.
R=asgerf@google.com , brianwilkerson@google.com , scheglov@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/2551023005 .
2016-12-07 11:08:14 -08:00
Konstantin Shcheglov
fc30904a39
Completion with the new analysis driver.
...
It works for top-levels, fields, locals, prefixed expressions.
Integration is not the most efficient - we resolve the full unit.
It works fine for files with about 1000 lines, about 50-70 ms.
We could slightly improve timing if we prioritize completion over
navigation and highlight notifications, which are currently prepared
and sent before completion.
In giant files like src/dart/element/element.dart, about 8500 lines,
it takes about 400 ms from typing to receiving completion. The theoretical
bottom bound for such files is about 70 ms - time that it required to
parse, create unlinked bundle, ensure that the API signature is the
same, load linked bundles and prepare to resynthesize. On top of this
goes any time required to resolve a single method and completion itself.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2478963002 .
2016-11-06 10:45:46 -08: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
Brian Wilkerson
ecc84b26a4
Break up another large file
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Dan Rubel
023295912a
improve import URI completions at EOF
...
fixes https://github.com/dart-lang/sdk/issues/27020
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2342473002 .
2016-09-14 11:22:25 -04:00
Dan Rubel
4fce5e9022
reduce the relevance of completions starting with "$"
...
fixes https://github.com/dart-lang/sdk/issues/27303
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2330413004 .
2016-09-13 14:21:31 -04:00
Konstantin Shcheglov
9aa060e67f
Issue 27143. Fill documentation for local, AST based completion.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27143
Review URL: https://codereview.chromium.org/2313003002 .
2016-09-06 12:05:20 -07:00
danrubel
d92849a8af
fix completion in switch case
...
Fixes https://github.com/dart-lang/sdk/issues/26856
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2250873002 .
2016-08-16 18:07:52 -07:00
pq
722d4a13b0
Default trailing comma support to true ( #26647 ).
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2185873002 .
See: https://github.com/dart-lang/sdk/issues/26647 .
2016-07-27 09:42:12 -07:00
Konstantin Shcheglov
7d9d451730
Don't insert additional ':' when changing a named argument name.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2136223004 .
2016-07-12 17:25:55 -07:00
danrubel
37a6f62566
fix code completion when enableTrailingCommas is true
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2128693002 .
2016-07-07 12:42:30 -04:00