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
Brian Wilkerson
99ce88f8bc
(TBR) Fix more failing tests
...
Review URL: https://codereview.chromium.org/2426723002 .
2016-10-17 12:57:56 -07:00
Konstantin Shcheglov
56bde6da28
Issue 27542. Guard against CompilationUnitElement is null in SearchMatch.element getter.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27542
Review URL: https://codereview.chromium.org/2409403002 .
2016-10-11 14:09:09 -07:00
Konstantin Shcheglov
831d3119f2
Issue 27536. Quick Fix for 'Avoid using braces in interpolation when not needed'.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27536
Review URL: https://codereview.chromium.org/2397153004 .
2016-10-07 12:51:04 -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
Konstantin Shcheglov
3647e7bac0
Order suggested Quick Fix imports: direct, export, non-API.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2377803002 .
2016-09-27 15:03:26 -07:00
Konstantin Shcheglov
e82cbea8fe
Issue 27386. Fix for 'use similar' Quick Fix for import-prefixed identifiers.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27386
Review URL: https://codereview.chromium.org/2361483002 .
2016-09-21 10:02:20 -07:00
Konstantin Shcheglov
bdc024a303
Move PackageIndexAssembler into analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2357283002 .
2016-09-21 08:54:46 -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
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
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
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
Konstantin Shcheglov
010578b88a
Issue 26335. Insert an empty line if the class body is a single line.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26335
Review URL: https://codereview.chromium.org/2256463002 .
2016-08-16 15:13:22 -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
0d84e5e586
New test for multiple imports with the same prefix name.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2200473002 .
2016-07-29 16:04:38 -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
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
dd18f93154
Issue 26926. Don't search hierarchy for static class members.
...
R=pquitslund@google.com
BUG= https://github.com/dart-lang/sdk/issues/26926
Review URL: https://codereview.chromium.org/2176173004 .
2016-07-25 11:36:52 -07:00
Konstantin Shcheglov
55fcc03572
Use the new StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT error.
...
...instead of StaticWarningCode.UNDEFINED_IDENTIFIER
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2162523003 .
2016-07-18 10:48:55 -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
Konstantin Shcheglov
79f7150d97
Issue 26249. Quick Assist to convert final fields into getters.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26249
Review URL: https://codereview.chromium.org/2140193003 .
2016-07-12 14:15:44 -07:00
Konstantin Shcheglov
f1fa32e356
Issue 26249. Quick Assist to convert getters into final fields.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26249
Review URL: https://codereview.chromium.org/2144763002 .
2016-07-12 13:31:53 -07:00
Konstantin Shcheglov
bf731dfcd5
Issue 26764. Insert required imports in the correct sorting order.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26764
Review URL: https://codereview.chromium.org/2143023002 .
2016-07-12 11:17:02 -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
Konstantin Shcheglov
dc42500408
Issue 26821. Don't add 'void' return type for setters when lint 'avoid_return_types_on_setters' is enabled.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26821
Review URL: https://codereview.chromium.org/2123333002 .
2016-07-06 13:00:38 -07:00
Konstantin Shcheglov
2cdaa62c98
Make LIBRARY_CYCLE, LIBRARY_CYCLE_UNITS and LIBRARY_CYCLE_DEPENDENCIES for library source.
...
It seems to me that it uses only LibrarySpecificUnit.library anyway.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2094133002 .
2016-06-27 08:43:59 -07:00
Brian Wilkerson
f183ec3a45
Fix equality between subclasses of Source
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2050083002 .
2016-06-09 07:42:32 -07:00
danrubel
2d310f1e67
improve completions in closures and switch statements
...
This addresses several situations where the parser interprets "as" as
part of an "as" expression, but the user is trying to enter the "async"
keyword or an identifier starting with "as".
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2034713004 .
2016-06-06 08:09:44 -04:00
Konstantin Shcheglov
a6b93661fd
Fix two build failures - for typeProvider and findElement.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2032893002 .
2016-06-01 18:54:10 -07:00
Jaime Wren
e3af3c8d76
Code completion improvement. Recommend all 'E.x' where E is an enum, also, filter out only the correct enum types in named arguments.
...
BUG=https://github.com/dart-lang/sdk/issues/24759
Review URL: https://codereview.chromium.org/1989393002 .
2016-05-18 12:08:17 -07:00
Konstantin Shcheglov
67a500e134
Issue 26460. Add Quick Fix for missing 'Function.call()' implementation.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26460
Review URL: https://codereview.chromium.org/1981353002 .
2016-05-17 09:00:53 -07:00
Konstantin Shcheglov
27650456d1
Improve completion after IfStatement.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1968883002 .
2016-05-11 08:36:27 -07:00
Konstantin Shcheglov
cd7b7fc018
More tweaks for 'for' completion.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1963323003 .
2016-05-10 20:22:12 -07:00
Konstantin Shcheglov
522eaa9a80
Don't suggest types, getters, etc in 'for (Type ^)'.
...
Variable names should be suggested there.
It does not work for the moment, I'll need to make changes into
VariableNameContributor. But NOT suggesting all the garbage - for me
thi is 90% of the full solution ;-)
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1960783002 .
2016-05-09 12:30:15 -07:00
Konstantin Shcheglov
cf71ab114b
Suggest 'is' in 'if (x is^)'.
...
So, we don't treat is as an expression start, and don't suggest
inappropriate 'while', 'await', etc or identifiers.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1958733002 .
2016-05-06 14:36:43 -07:00
Konstantin Shcheglov
3775d92000
Suggest 'var' and 'final' in intializer of 'for'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1953893004 .
2016-05-06 13:49:48 -07:00
Konstantin Shcheglov
b73b82221e
Fixes for completing 'for (var v in^)' and 'if (v is^)'.
...
The 'if (v is)' will require more work - we somehow manage to suggest
'if', 'final', 'switch', 'while', but NOT 'is'. But at least identifiers
are now out.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1956813004 .
2016-05-06 13:17:15 -07:00
Konstantin Shcheglov
ada9cf43db
Issue 26355. Don't overwrite full index with declarations-only one.
...
What happens in this case is that when we analyze this project with
many (very small) files, we successfully index first declarations
(on computing RESOLVED_UNIT3) and then RESOLVED_UNIT. But when we attempt
to search, we ask for RESOLVED_UNIT, which is flushed. So, we compute it.
In the process we compute RESOLVED_UNIT3, and the listener in
_setupIndexInvalidation() indexes declarations, and overwrites the full
index.
There are several possible solutions, the simplest one is to not
overwrite any existing index information while indexing declarations.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26355
Review URL: https://codereview.chromium.org/1946353004 .
2016-05-05 07:10:14 -07:00
Brian Wilkerson
08241e9072
More strong mode clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1947813002 .
2016-05-04 07:42:46 -07:00
Konstantin Shcheglov
0f0b38dab3
Implement stable resolution of generic types without type arguments to their bounds.
...
R=brianwilkerson@google.com , leafp@google.com
BUG= https://github.com/dart-lang/sdk/issues/26265
Review URL: https://codereview.chromium.org/1927323002 .
2016-04-29 08:25:55 -07:00
Konstantin Shcheglov
470c5de12e
If the expected 'returnType' is 'null', just do not check it.
...
The completion tests are fragile and too sensitive to task model
changes. I have a change that inserts a new analysis result between
RESOLVED_UNIT3 and RESOLVED_UNIT4, and by doing this the next task to
perform resolves types in imported libraries. But in CC test we
continue performing analysis tasks and incidentally resolve something
what the 'null' checks don't expect.
So, I think we need to stop doing these checks.
If needed, we can check something directly by asking the state of some
analysis results from AnalysisContext.
R=jwren@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org/1932003002 .
2016-04-28 13:15:33 -07:00
Jaime Wren
1aee4602bc
Code completion bug fix, https://github.com/dart-lang/sdk/issues/26342 , and test cleanup in variable_name_contributor_test.dart
...
BUG=https://github.com/dart-lang/sdk/issues/26342
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1924683002 .
2016-04-27 09:26:49 -07:00
Jaime Wren
e01634bd79
Code completion progress part two of fix to https://github.com/dart-lang/sdk/issues/24254 , addition of new contributor, variable_name_contributor.dart.
...
The completions are not yet showing up in either IDE, IntelliJ or Atom.
BUG=https://github.com/dart-lang/sdk/issues/24254
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1916893002 .
2016-04-25 12:51:14 -07:00
Jaime Wren
58bf3075a8
Code completion progress part one of fix to https://github.com/dart-lang/sdk/issues/24254 , addition of optype.includeVarNameSuggestions
...
BUG=https://github.com/dart-lang/sdk/issues/24254
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1910263004 .
2016-04-22 11:00:21 -07:00