Brian Wilkerson
fba13af5a9
Finish updating OverrideContributor to use DartChangeBuilder
...
Change-Id: Ib3190e6825994c9e727fb80a319cfc04be943b76
Reviewed-on: https://dart-review.googlesource.com/38143
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-02-02 16:19:37 +00:00
Konstantin Shcheglov
0ff7348c7b
Switch tests to use Flutter package mock that more closely resembles the actual package structure.
...
So, we can test that "Wrap with Center" works when we ask for Center
in package:flutter/widgets.dart
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I3446f5cf97c1d6f2e68686de6561d894b5e95620
Reviewed-on: https://dart-review.googlesource.com/38162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-01 22:12:06 +00:00
danrubel
787d395389
Update code completion to suggest covariant
...
In addition to updating code completion, this also
addresses comments in https://dart-review.googlesource.com/c/sdk/+/34520
* Change expect to assert `}` where expect is unnecessary
* Extract skipToLastModifier utility method
* Fix spelling
Change-Id: I6a0446d77fac995da3e4d1d2f682f75d584b275f
Reviewed-on: https://dart-review.googlesource.com/34960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-01-17 03:30:23 +00:00
Paul Berry
105b170ddb
Roll package test to 0.12.29+1 and stack_trace to 1.9.0
...
This required some changes to analysis_server, since analysis_server
used to have its own version of pumpEventQueue(). Since
pumpEventQueue() is now provided by the test package, I've removed
analysis_server's version, and I've updated some of the call sites to
pass in "times: 5000" to replicate the old analysis_server behavior.
This also required some changes to analyzer, since the fail() method
is now marked as @alwaysThrows, so no code may follow it without
producing a dead code hint.
Change-Id: Ie5ef3a5cc685c18da02de699e59f63f3bb8865f7
Reviewed-on: https://dart-review.googlesource.com/32683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-01-07 14:22:23 +00:00
Dan Rubel
a459bc8b7c
Add fasta parser constructor reference recovery
...
This CL fixes/improves 2 keyword contributor situations
when analyzer is using the fasta parser:
* Recover gracefully given a constructor reference
followed by a dot without an identifier
* Include a colon whenever suggesting the 'default' keyword
Change-Id: I393ef16130c7d1288ac4c18e6fdc17dbbe1421ea
Reviewed-on: https://dart-review.googlesource.com/32145
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-01-03 20:42:24 +00:00
Brian Wilkerson
8e7781ea9e
Convert remaining tests to use ResourceProviderMixin
...
Change-Id: I7bd0941a415737bd3c9c55e9650f2a982937f777
Reviewed-on: https://dart-review.googlesource.com/31961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-01-02 16:33:14 +00:00
Brian Wilkerson
1d8a5d77c1
Convert more tests to use ResourceProviderMixin
...
Change-Id: Ia4cce51e33c79c82a989bfda9b8303dfaa72e103
Reviewed-on: https://dart-review.googlesource.com/31880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-01-02 00:47:34 +00:00
Brian Wilkerson
09edf6b3fe
Remove an unused import
...
Change-Id: I67c1b7a1bf24fcfb83d7ceb4be60d1492c6c54af
Reviewed-on: https://dart-review.googlesource.com/31405
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-12-28 16:41:13 +00:00
Dan Rubel
1231e90fee
Code complete identifiers not directly referenced by the analyzer AST
...
The fasta parser sometimes "drops" unexpected tokens during recovery.
When this happens, the dropped or skipped token is not reported to
the listeners, and thus does not become part of the analyzer's AST.
These tokens are still in the token stream, but will not be found
by the existing CompletionTarget mechanism.
For example, the fasta parser parses
'if (v i) {}' as 'if (v) {}' and drops the 'i' token.
This CL introduces a new CompletionTarget.droppedToken field.
If a keyword or identifier has been dropped by the parser,
but overlaps the code completion offset, then that token
is placed into this new field.
In the example above, when code completing the 'i',
the CompletionTarget will now be
containingNode = '(v)'
entity = ')'
droppedToken = 'i'
Change-Id: I15e43529ab4a72de9500c521be278fa13ae68d99
Reviewed-on: https://dart-review.googlesource.com/31285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-12-22 21:55:35 +00:00
Dan Rubel
3392f32e50
Update code completion of async keywords
...
This updates the KeywordContributor for use with the fasta parser
and cleans up several code completion tests by introducing
a 'usingFastaParser' flag.
Change-Id: Ife2d945065c23ccd9f2d8e85e5c24a6b956c75ae
Reviewed-on: https://dart-review.googlesource.com/30902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-12-21 15:36:11 +00:00
Dan Rubel
4e8c6e7862
Add more fasta parser field recovery
...
Change-Id: I8a63e04c80931d2b2e8b24a547cc845837dee5d8
Reviewed-on: https://dart-review.googlesource.com/30625
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-12-20 00:38:38 +00:00
Dan Rubel
166cc11a64
Add fasta parser function expression recovery
...
Change-Id: Id5e27b8f186da23fd141fda12621f1ae3bcd1f8c
Reviewed-on: https://dart-review.googlesource.com/30580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-12-19 20:57:43 +00:00
Dan Rubel
c2ae2137c9
Improve code completion suggestions in argument lists
...
This updates keyword code completion to suggest 'async', 'async*',
and 'sync' in new situations. This is necessary given that the fasta
parser recovers in a slightly different way than the analyzer parser.
Change-Id: I44cb42bc02874811df94a6586c7b9c9b5d7574c9
Reviewed-on: https://dart-review.googlesource.com/30460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-12-19 16:06:52 +00:00
Brian Wilkerson
941b3b25c3
Clean up some failing tests
...
Change-Id: I79d951bab655ac322750222f921e055ad6ed6ef9
Reviewed-on: https://dart-review.googlesource.com/29040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-12-13 14:16:36 +00:00
Brian Wilkerson
081074ebf4
Completion suggestion relevance influenced by parameter types (issue 31592)
...
Change-Id: I8f03dea74fac8080bc628128a0f32b09784d0248
Reviewed-on: https://dart-review.googlesource.com/28780
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-12-12 18:40:59 +00:00
Devon Carew
331c3ab82f
Only show dart files in the imports code completion.
...
Bug:
Change-Id: Ib2e48422e85c6abcdf0c8af33a8f80e6d36111f5
Reviewed-on: https://dart-review.googlesource.com/23700
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-11-25 22:20:08 +00:00
Devon Carew
dd6e86a2e0
Update flutter code completion to work for slivers.
...
Bug:
Change-Id: I87868135fd742d443b4fc2c8a4cae49902502b85
Reviewed-on: https://dart-review.googlesource.com/21880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2017-11-19 01:20:26 +00:00
Konstantin Shcheglov
6b1658906e
Support for Flutter is not limited to code correction. Move to utilities.
...
R=brianwilkerson@google.com
Bug:
Change-Id: Idaa90946710fcbec2a35a91eb35b5ead68cf4170
Reviewed-on: https://dart-review.googlesource.com/16621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-25 19:11:38 +00:00
Brian Wilkerson
c0bf4ab395
Handle recursive import/export graph in completions
...
Change-Id: Ia164c13f3119f569d781292353acc17243c8a464
Reviewed-on: https://dart-review.googlesource.com/7000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-19 18:01:04 +00:00
Brian Wilkerson
28381b8f06
Add completion of keywords in partial field declarations
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/3006033002 .
2017-09-03 13:04:06 -07:00
Brian Wilkerson
c38c97def3
Reduce duplicated code
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3002303002 .
2017-08-25 08:18:39 -07:00
danrubel
84a36f1b77
flag to limit file and package URI completion suggestions
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/3003233002 .
2017-08-23 13:39:32 -04:00
Brian Wilkerson
ebe2ce681e
Fix ClassElement.allSupertypes to include interfaces of mixins (issue 29767)
...
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/3000183002 .
2017-08-18 07:30:05 -07:00
Brian Wilkerson
5b88eef0af
Suggest covariant in parameter lists
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2986133002 .
2017-07-28 10:33:07 -07:00
Konstantin Shcheglov
bdd69ccd6c
Remove UriReferencedElement with its uri/uriOffset/uriEnd properties.
...
The 'Move File' refactoring does not work, so I comment out most
of its code.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2982993003 .
2017-07-19 09:31:03 -07:00
Konstantin Shcheglov
00d5012906
Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...
...instead of mixing formatting with actual changes in many CLs.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Brian Wilkerson
e454986288
Add code to run more tests from test_all
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2968233002 .
2017-07-06 12:24:01 -07:00
Steve Messick
c26c2774ca
This defines some postfix completion templates for use in the IntelliJ editor.
...
R=brianwilkerson@google.com
To use it, you'll need a version of the Dart plugin with this PR patched in:
https://github.com/JetBrains/intellij-plugins/pull/534
Review-Url: https://codereview.chromium.org/2917943002 .
2017-06-26 09:53:02 -07:00
Erik Corry
029b1cb948
Spelling fixes e to i.
...
R=kevmoo@google.com
BUG=
Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Brian Wilkerson
ec8505fc79
Fix hints and clean-up obsolete comment syntax (TBR)
...
Review-Url: https://codereview.chromium.org/2952233002 .
2017-06-22 10:59:26 -07:00
pq
b502bb6956
Prioritize required name param completions (flutter-intellij#1049).
...
R=danrubel@google.com
Fixes: https://github.com/flutter/flutter-intellij/issues/1049
Review-Url: https://codereview.chromium.org/2927343002 .
2017-06-09 10:20:16 -07:00
Brian Wilkerson
0e6586492d
Make common tests consistent
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2925273003 .
2017-06-09 08:40:16 -07:00
Brian Wilkerson
aa33d71071
Another attempt to fix the windows tests
...
Review-Url: https://codereview.chromium.org/2927873002 .
2017-06-07 12:35:56 -07:00
Brian Wilkerson
a8919b8237
Support a short-hand way to create linked edit groups
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2928723003 .
2017-06-07 09:07:39 -07:00
Brian Wilkerson
db0a8a76ae
Move CompletionTarget and OpType for use by plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2924703002 .
2017-06-06 07:07:19 -07:00
Brian Wilkerson
1c4cee9a82
Remove an obsolete test
...
Review-Url: https://codereview.chromium.org/2925723002 .
2017-06-05 14:45:11 -07:00
Brian Wilkerson
dc972240d4
Remove unused IdeOptions
...
R=pquitslund@google.com
Review-Url: https://codereview.chromium.org/2924633002 .
2017-06-05 14:12:17 -07:00
Brian Wilkerson
e8a5e404c3
Move LocalDeclarationVisitor for use by contributors that will be moved to analyzer_plugin
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2918343002 .
2017-06-05 10:24:54 -07:00
Konstantin Shcheglov
ab9ee72a34
Switch server tests to strong mode.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2903523003 .
2017-05-23 14:58:53 -07:00
Brian Wilkerson
7d26ff6d4f
Remove some more library directives
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
pq
aa491e7133
Support tear-off completions for named params (in constructors) (flutter-intellij#836)
...
R=danrubel@google.com
Fixes: https://github.com/flutter/flutter-intellij/issues/836
Review-Url: https://codereview.chromium.org/2883363002 .
2017-05-16 13:40:33 -07:00
Brian Wilkerson
fb982f5476
Make server use the common protocol classes
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2879273002 .
2017-05-15 09:35:46 -07:00
Devon Carew
4afc0aeb73
Fix some analysis issues.
...
BUG=
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2882003002 .
2017-05-13 16:24:47 -07:00
danrubel
69cc6c3183
convert completion tests to use new analysis driver
...
Update more tests and remove dead code from tests
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2875223003 .
2017-05-12 11:48:20 -07:00
danrubel
66bb2d618e
Remove unused analysisContext from completion request and contributors
...
Now that the analysis server uses the new analysis driver,
the CompletionRequest analysisContext field is always null.
This change removes that field and much of the unused code.
R=brianwilkerson@google.com , pquitslund@google.com
Review-Url: https://codereview.chromium.org/2877653002 .
2017-05-11 09:38:50 -07:00
danrubel
6798cdfcd1
cleanup dart code completion contributors
...
Remove the following unnecessary methods now that analysis driver
resolves everything in the compilation unit upfront.
DartCompletionRequest
* resolveUnits
* resolveImports
* resolveContainingStatement
* resolveContainingExpression
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2873943003 .
2017-05-11 09:12:36 -07:00
Steve Messick
55097a44b3
Recover from merge problem
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2868383002 .
2017-05-10 13:12:14 -07:00
Brian Wilkerson
fbc3f3708d
Remove unused reference to SearchEngine
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2872803003 .
2017-05-09 14:32:12 -07:00
danrubel
959b7c14b8
improve completion for formal param initializers
...
R=pquitslund@google.com
Review-Url: https://codereview.chromium.org/2864233002 .
2017-05-08 06:50:46 -07:00
Brian Wilkerson
6b8a56cd7f
Switch the default from non-driver to driver in several tests
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2864813002 .
2017-05-07 08:34:16 -07:00