Commit Graph

1474 Commits

Author SHA1 Message Date
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
Jaime Wren bfb5849f44 Code completion bug fix, don't suggest optional field formal parameters that are already in the constructor
BUG=https://github.com/dart-lang/sdk/issues/26255
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1907723002 .
2016-04-21 10:46:35 -07:00
Jaime Wren cc065a3ad0 Code completion improvement, use type information when suggesting constructors, part 2.
This finishes the work started with https://codereview.chromium.org/1892823003/, by also adding the filter into the local_library_contributor.dart.

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

Review URL: https://codereview.chromium.org/1908703002 .
2016-04-21 10:16:06 -07:00
Jaime Wren 345051cf1c Code completion test cleanup, rename test_DefaultFormalParameter_named_expression_filter as test_ArgumentList_namedParam_filter in local_reference_contributor_test.dart
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1896853004 .
2016-04-20 11:08:18 -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
Jaime Wren 214a201ae5 Code completion improvement, use type information when suggesting constructors
BUG=https://github.com/dart-lang/sdk/issues/26254
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1892823003 .
2016-04-18 12:11:46 -07:00
Jaime Wren 2e87758149 Code completion tests: 2 additional tests for the is and as expressions.
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1889873003 .
2016-04-14 13:28:00 -07:00
Jaime Wren 01aaf8629e Code completion improvement: in NamedExpressions (m(someNamedParam: ^)), use type information to sort variables higher in relevance.
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1882243003 .
2016-04-13 16:11:39 -07:00
Jaime Wren 7b8d0b71a9 Additional code completion tests for the as expression in imported_reference_contributor_test.dart
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1875283002 .
2016-04-12 11:09:56 -07:00
danrubel 657f88d7f0 use type information to filter RHS of "is" expression for imported types
fixes #22357

R=jwren@google.com

Review URL: https://codereview.chromium.org/1876603002 .
2016-04-11 15:57:41 -04:00
Jaime Wren 8a9403e15c Code completion improvement in the DAS- only suggest completions on the RHS of an as-expression that are proper subtypes of the type of the LHS of the as-expression.
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1872073002 .
2016-04-11 09:59:30 -07:00
Jaime Wren bb62c408bf Fix for issue 22357: use type information on the RHS of is expressions to improve quality of completions.
BUG=https://github.com/dart-lang/sdk/issues/22357
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1871073003 .
2016-04-08 15:16:53 -07:00
danrubel dbaf0c33b0 show only named argument suggestions - fixes #25198, fixes #23992
R=jwren@google.com

Review URL: https://codereview.chromium.org/1867063003 .
2016-04-08 12:54:31 -04:00
Jaime Wren 3c8b0d20f3 Fix for issue 23861: CompletionSuggestion.parameterType are now populated.
BUG=https://github.com/dart-lang/sdk/issues/23861
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1864243002 .
2016-04-07 13:01:53 -07:00
Jaime Wren 84b9a47926 Fix for issue 24555: import/export/part completion improvement.
BUG=https://github.com/dart-lang/sdk/issues/24555
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1860213002 .
2016-04-06 09:52:47 -07:00