Commit Graph

733 Commits

Author SHA1 Message Date
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
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 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 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
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
Brian Wilkerson 97c613aad4 More strong mode changes in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1852113002 .
2016-04-03 17:56:30 -07:00
Dan Rubel 3b18b656c3 tests to assert completion suggestion replacementLength includes entire URI
https://github.com/dart-lang/sdk/issues/26083

R=jwren@google.com

Review URL: https://codereview.chromium.org/1843513003 .
2016-03-31 12:38:38 -04:00
Brian Wilkerson 338c95be8c Sort the files in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1834423002 .
2016-03-28 18:25:29 -07:00
Jaime Wren 2a3acf94ec Fix in code completion for named parameters in constructor, method and function invocations, https://github.com/dart-lang/sdk/issues/25975
BUG=https://github.com/dart-lang/sdk/issues/25975
R=brianwilkerson@google.com, danrubel@google.com

Review URL: https://codereview.chromium.org/1806113002 .
2016-03-18 10:26:27 -07:00
Jaime Wren ecd5ddb734 Changes to test source in arglist_contributor_test.dart, to remove warnings from the source
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1804233002 .
2016-03-16 11:31:29 -07:00
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07:00
Brian Wilkerson 93aa6f1ecf Deprecate the generated element library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1789233002 .
2016-03-12 09:13:44 -08:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Konstantin Shcheglov 76f4578af8 Start using the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1786013004 .
2016-03-11 14:02:37 -08:00
Brian Wilkerson ef1c632679 Clean up some warnings (issue 25964)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1778663006 .
2016-03-09 17:32:49 -08:00
Brian Wilkerson 71e7ed86c0 Move scanner out of generated and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1693083004 .
2016-02-14 07:48:44 -08:00
danrubel 6188d18eec rework completion request resolve imports
* rename resolveDirectives --> resolveImports
* rework resolveImports to return list of ImportElement rather than Directive
* new resolveDirectives test
* set priority source during completion tests

This and https://codereview.chromium.org/1685653002/ fixes https://github.com/dart-lang/sdk/issues/25690

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1693933002 .
2016-02-13 23:15:52 -05:00
Konstantin Shcheglov 20d31ea8c3 Compute ElementImpl.hashCode using location.
We need this to ensure that Impl and Handle have the same hash.

This reduces number of shared test failures from 267 to 67 when using
SDK summaries.

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

Review URL: https://codereview.chromium.org/1677213003 .
2016-02-09 07:06:22 -08:00
Dan Rubel e5bbeddf4d completion performance measurement for local status page
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1536083002 .
2015-12-19 11:12:45 -05:00
Dan Rubel 43ee7b5bc9 move OpType into dart folder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1523243006 .
2015-12-19 11:11:04 -05:00
pq 1f8eddcc21 Cache element docs (and add to completions) [#23694].
This does away with the expensive call to `computeDocumentationComment` in favor of cached comments.  Notably this makes adding doc content to code completion proposals performant (and so is done here).  It should also make `dartdoc` *much* faster for doc generation since there are no more trips to disk to fetch comments  for elements (still needed for source though).

For more on the desire for docs in completions see here: https://github.com/dart-lang/sdk/issues/23694

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

Review URL: https://codereview.chromium.org/1534043002 .
2015-12-17 21:07:42 -08:00
Dan Rubel fbaba56375 move DartCompletionSorter to dart specific contributor
consolidate common test code
remove duplicate test

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1539693002 .
2015-12-17 17:54:29 -05:00
Dan Rubel 4ee5173f42 move ReplacementRange into dart specific contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1531383002 .
2015-12-17 16:24:49 -05:00
Dan Rubel b3fa2629bf remove CompletionCache and obsolete tests, and cleanup imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1533973002 .
2015-12-17 16:00:34 -05:00
Dan Rubel 5e128e2544 suggest IDENTIFIER not INVOCATION for dartdoc refs
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1530393004 .
2015-12-17 11:00:15 -05:00
Dan Rubel 6d5efd3175 remove unused DartCompletionCache
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1536683003 .
2015-12-17 10:58:49 -05:00
Dan Rubel 0c6fb170dc Do not suggest loop variable when completing expression in ForEachStatement
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1534793002 .
2015-12-17 10:57:51 -05:00