Commit Graph

1411 Commits

Author SHA1 Message Date
Devon Carew 5871cfb23c [analysis server] remove older analysis server flags
Change-Id: I4384c98a067467def91e2b769d711069ad057a27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170801
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-09 03:54:58 +00:00
Konstantin Shcheglov d484a6f09f Remove support for experiments in Analysis Server options.
analysis_options.yaml should be used instead.

Change-Id: I02a03667d5de5c9e764e30ff3c77b8df6deaa221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 20:46:02 +00:00
Konstantin Shcheglov f8fdb4be05 Remove return type from addSource().
Change-Id: Iab4ecce3cdd6f4b4034cb293f56f0c943d069b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 18:40:50 +00:00
Konstantin Shcheglov a074c793b8 Rename to resolveTestCode() and resolveTestFile().
Change-Id: I69a598c5acef86c6a59212648496569423007ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-27 19:35:47 +00:00
Konstantin Shcheglov d9d7324b27 Issue 43777. Update analysis_server/ tests to run when Null Safety is enabled by default in 2.12
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: Ibd1da16b58b8304d6f1d4260615c7049fc5ffe59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-27 18:19:33 +00:00
Konstantin Shcheglov fbfc723de7 Use CompoundAssignmentExpression instead of LHS element/type.
This adds some technical debt in form of using writeOrReadElement in
clients, which can be paid incrementally by migrating these places to
handling assignment like expressions one by one. Doing it all in one
CL was too much. But now the underlaying AST resolution will be
sound.

In the next breaking change we will remove
setAssignmentBackwardCompatibility(), so stop setting elements/types
for assignment targets.

Change-Id: I11626876cfed25653edb0cc18544aba51cef5965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-14 18:45:08 +00:00
Danny Tuppeny f820c1fb8e [Analyzer] Support using \r\n in correction tests when running on Windows
Change-Id: Id56e7c17974d5036706dbe451a2c307907bdcd3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163208
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-23 07:53:16 +00:00
Mike Fairhurst cd7ca6b26f [analysis_server] Fix type nullability for "add try" fix
You can't throw null, so can't catch nullable types.

Ensure we don't print '*' in any case.

Handle nested types.

Change-Id: I69119bf6e7424d1a8771bd1f7d2fcc98b692cf9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163130
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-09-18 01:21:41 +00:00
Mike Fairhurst ad3deac7d9 [analysis_server] Show correct nullability for required parameters
Change-Id: I13f2f4693370e5e445bb3d2065a17b698be45e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162862
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-16 21:44:29 +00:00
Mike Fairhurst e395675d0b [analysis_server] Show correct nullability for named parameters
Change-Id: Ia0aedc01493ef6a1bccbdbcfee5fd70ec3ef02db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162820
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-16 21:10:49 +00:00
Danny Tuppeny d3b0979b04 [Analyzer] Use ImportOrganizer for Sort Members instead of own code
Change-Id: I8640a49fb1577eb8b79673970208791e02d475de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162009
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-09-09 08:31:04 +00:00
Danny Tuppeny 725d3e4498 [Analyzer] Handle directive comments that are split between directives
Change-Id: I013195403361772322c848db10d0c59e48a702b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-09-08 14:47:22 +00:00
Mike Fairhurst d313fb70b6 [analysis_server] Tests should import dart:async to use Future
Tests which depend on the import can merely use Completer instead of
Future to get the same result. Tests which do not rely upon the import
have had the import removed.

Change-Id: I74641a58b1f97c8599c8faad86943b1c68508980
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161625
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 21:48:03 +00:00
Mike Fairhurst 1134a0f17c [analysis_server] Remove unused dart:async imports
Change-Id: I764ee78cb9e31bdb3abaa36ca4754e1fed180311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161447
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:29:52 +00:00
Danny Tuppeny c34cd2c758 [Analyzer] Use relative paths to libraries in refactor error messages
Change-Id: Iacac96d3bf80a5ee29b45500c439ec7f527e6a39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-09-01 16:10:01 +00:00
Brian Wilkerson 680f3b51ca Suggest named parameter names in a super constructor invocation
Change-Id: Ibe095cab1473aefd3a1067bb0264a115f44c05d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159964
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 20:42:07 +00:00
Konstantin Shcheglov cf4d41074e Fix crash when working with directives with invalid URIs.
R=brianwilkerson@google.com

Change-Id: Id8bd5c49269c58404b4a4d3182b77a37fb494c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-22 18:37:51 +00:00
Konstantin Shcheglov c4f3bfb5cb Rename PackagesContent to MockPackages.
We have MockPackages in DAS, although implementation is quite
different. At some point we might want to unify them. But for now
just name it similarly.

R=brianwilkerson@google.com

Change-Id: Id4bb2b16b845368d99260200f1172562362a8beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 20:33:59 +00:00
Konstantin Shcheglov d68227dfe0 Remove PackageMixin.
R=brianwilkerson@google.com

Change-Id: I801d64f919e8e8fded0e08ebc6e9ac2b8ece4b32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 17:20:39 +00:00
Jonas Hungershausen 94be2fc1f8 [Analyzer] Keep comments when organizing imports
This change adjusts the organize imports logic, to keep any comments
written in the line above an import statement attached when
organizing the imports, while being smart about what comments to keep.

Closes https://github.com/dart-lang/sdk/issues/42515
Change-Id: Ibcca4f24411ac16bcdb17f66fb6d2b9c45f7d367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157743
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-11 15:03:59 +00:00
Devon Carew 57b192a0fc [analyzer] remove the completion language model file
Bug: https://github.com/dart-lang/sdk/issues/42988
Change-Id: I3988f08eb9a7480aacb4a7be79f537595807a3c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158067
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-11 14:46:59 +00:00
Paul Berry d4e4abdef6 External field support: add a notion of external fields to the AST and element model.
In follow-up CLs I will update error reporting logic.

Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-10 21:54:54 +00:00
Brian Wilkerson 14a6aac97b Stop testing the relevance of suggestions
Change-Id: Ic18d329280ff995e3ed4c33d2cf124e3ce0aea8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-06 04:48:26 +00:00
Paul Berry b5a3292260 Abstract field support: add a notion of abstract fields to the AST and element model.
In a follow-up CL I will update error reporting logic.

Change-Id: I6fd2916c24a531b1f41bd2872301ffec1fdb8722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 02:19:46 +00:00
Brian Wilkerson 5f38d69b5e Fix a bug in ExtensionMemberContributor when the extended type is not an interface type (issue 42945)
Change-Id: Iaa1e6d5c21ecd8d78db68d49bc624d661f23978b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157345
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-05 20:47:59 +00:00
Konstantin Shcheglov c2d28d1569 Rename Null Safety tests.
R=brianwilkerson@google.com

Change-Id: I9276244cab52cb5c0f2687052f2a3df9a9fd48b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 00:26:08 +00:00
Jaime Wren 1a60f94fd0 Add two failing tests in the local_reference_contributor_test.dart, after some for(var foo ...) ^, the completion is in the implicit statement which is in the scope of the foo declaration.
I imagine that similar tests could/ should be written for other such ASTs.

Change-Id: Iea059af339e5dec34a937ed2c28fe55fdb072fc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-06 17:06:10 +00:00
Brian Wilkerson 5d064d2748 Add and use a feature based on the distance to a local variable declaration
Change-Id: Id89e2e9bb417fa62095d4e81f9721a8d3c0893ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152901
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-01 18:19:44 +00:00
Konstantin Shcheglov c4503f0074 Use OperationPerformance to track performance in CompletionPerformance.
R=brianwilkerson@google.com

Change-Id: I50158512020be87b3c51363ed2e503c3df3cfaae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-30 17:44:54 +00:00
Danny Tuppeny e8e366714c Rename "Sort Directives" as "Organize Imports" in the quick-fix
Fixes https://github.com/Dart-Code/Dart-Code/issues/2552.

Change-Id: I5591b3fa7b0e2c03e104b16f878689cf2e8caa4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151514
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-29 16:38:13 +00:00
Brian Wilkerson b95538cff1 Generate tables of keyword relevance
Change-Id: Ic0f07561bd4b4cd81a3b511bac31b0f7b4906319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151881
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-23 18:57:03 +00:00
Brian Wilkerson ab73158758 Fix the windows bot and update MockSdk
Fixing the test that's causing the Windows bot to fail required updating
the MockSdk, which cause a lot of other changes. I would have done this
in two separate CLs if I'd known how big this was going to get, but I'm
hoping it isn't too big.

Change-Id: Idee56bab5e73a78ab7857e81177090493aa08b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151874
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-22 14:34:25 +00:00
Jaime Wren ae6a489dfb New 'non-type member completions' relevance tests in the analysis server.
This test includes: a failing type parameter test, as well as a common completion bug with Flutter widget construction, this test shows that the new relavance logic does the right thing.

When we add additional categories in completion metrics to split apart this group of completions, this test may be split as well, this name seemed appropriate for the time being.

Change-Id: I67638a121528be5e9a20bebc022a576282db1867
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151631
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-18 00:03:31 +00:00
Jaime Wren 6021f0aec2 Follow up on https://dart-review.googlesource.com/c/sdk/+/151343, assertOrder() now accepts the order with current.relevance > previous.relevance instead of current.relevance >= previous.relevance, additional tests use assertOrder([]).
Change-Id: I7f7c27d2e3205cc4b556e0fbb1b238a743d281ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151323
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 06:55:21 +00:00
Jaime Wren 047f1721a1 Remove the DartCompletionManagerTest and replace it with CompletionRelevanceTest, making all of the completion relevance tests consistent.
Change-Id: I24d042b420a3c1d6f38b063913cb702c34858076
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-15 22:37:04 +00:00
Brian Wilkerson 01f284c661 Clean up the return type of the contributors compute method
All of the contributors now contribute through the builder so the return
value was always an empty list.

Change-Id: I9e5746a7c7e2dc256a00c6091f6bf9d46331b617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150803
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-10 19:37:12 +00:00
Jaime Wren abde894da6 Merge the inherited_reference_contributor.dart into the local_reference_contributor.dart contributor. This fixes an outstanding bug in completion inwhich local and inherited methods were recommended in completions instead of local declarations.
Change-Id: Ie9d2b51b2b25d5537a59f73f23e3f6224190eedf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-10 14:59:27 +00:00
Jaime Wren 0c54bb7563 Finish implementing the shouldSuggest(..) logic in the local_reference_contributor.dart contributor, adding tests for each case.
The next step is to merge the inherited_reference_contributor.dart into this contributor (local_reference_contributor.dart) to prevent getters, setters and methods from being suggested when they are, in fact, shadowed.

Change-Id: I406cc916d69ee87eaa1b516e6f85996464d62cab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150460
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-08 21:42:22 +00:00
Jaime Wren 48b4528a44 Fix completion issue with the shadowing inside of function declarations
Change-Id: I3bcef03e47400d937b9064a49baa950a3a306f5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150289
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-07 00:23:11 +00:00
Jaime Wren 403955cf34 Fix completion issue with the shadowing of enum declarations and enum constants
Change-Id: I955fb7a0137552299097d8a77a81f6d27a44f354
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-05 20:21:26 +00:00
Jaime Wren 1e0611cfac Refactor the LocalConstructorContributor into the LocalReferenceContributor.
local_declaration_visitor.dart was updated to better implement ConstructorDeclarations

This adds the API of _recordCompletionElement() and _elementAlreadyInCompletionSet() to local_reference_contributor.dart, if this API looks good and lands, I will use it in the rest of the contributor to fix other known shadowing bugs.

local_constructor_contributor_test.dart was removed (a large copied & pasted body of tests not providing value) and tests were added at the beginning of local_reference_contributor_test.dart.  Tests in this file were also updated accordingly.

The change of the testCommentSnippets025 test in completion_test.dart is due to the framework not supporting (in a more robust way) the allowance of both a class and an implicit constructor

The addition of the testCommentSnippets045 test in completion_test.dart is to show that constructor invocations don't need the new keyword.

Change-Id: Ic4a52e3cb94320a92f24b1c743dd61e18c6c7b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150165
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-05 16:15:04 +00:00
Jaime Wren 609c0d35eb Refactoring in some *_contributor_test.dart files, more assert*() method declarations to superclass to share instead of having multiple copies
Change-Id: I43b539c78b5b3880b747c75add1f82ca78510893
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149365
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2020-05-29 15:26:25 +00:00
Brian Wilkerson dc37860209 Change the element kind used for relevance computations
We used to be somewhat inconsistent about the choice of element kind for
top-level variables, getters and setters and fields, getters and setters
in classes, mixins and extensions. We no longer use GETTER and SETTER as
kinds, using FIELD and TOP_LEVEL_VARIABLE everywhere. This makes some
cases better and some worse, but improves the overall score across all
the completions in our metrics.

Change-Id: Idd0b10b3afe6023ecf39930b6a09abf28b3232bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-24 19:21:18 +00:00
Parker Lougheed 492875cf35 Fix code completion after typedef reference
Has to make some changes to testing and elsewhere due to the call()
function lacking some information.

Fixes #38687

Bug: https://github.com/dart-lang/sdk/issues/38687
Change-Id: Ib00b3a9a15efa393f97130448091b42d5d569924
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 21:33:14 +00:00
Konstantin Shcheglov 1821f0ec32 Issue 41997. Fix for indexing, searching, renaming members of unnamed extensions.
Bug: https://github.com/dart-lang/sdk/issues/41997
Change-Id: I963a9ceae03a0d1ed3d04936c4042980a08fa56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 18:12:30 +00:00
Brian Wilkerson 3a764b7ae4 Stop suggesting private static members in libraries where they are not visible
I suspect that I broke this recently with my refactoring work.
Unfortunately there were no tests to tell me that I'd done so.

An alternative would be to move the visibility checks into the
SuggestionBuilder. I'd been kind of trying to keep that class focused on
_how_ to build suggestions rather than _whether_ to build suggestions,
but there might be value in having the logic for _whether_ to build them
also be centralized. If so, it could either be in SuggestionBuilder or in
a separate (wrapper) class. Thoughts welcomed.

Change-Id: I71198583496a685dd7865ef7955ef2dabaa3e1f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148680
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-19 22:44:10 +00:00
Brian Wilkerson 9eff98594f Cleanup unnecessary references to experiments that are enabled by default
There's a good chance that I missed some references, but this should
clean up a significant number of them.

Change-Id: Ib0c93d2505d850903315c93979eca40244ab1585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147048
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-07 18:42:48 +00:00
Brian Wilkerson f16663a678 Convert LocalReferenceContributor to use SuggestionBuilder
Change-Id: I1065b6294b315abcf60b9e743a9c6961a3080978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147047
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-07 17:40:48 +00:00
Konstantin Shcheglov c5a5884b7f Fix for crash when completing a setter without parameters.
Change-Id: I7e749c96a72569869189283e9affd350ba09f5a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-06 19:38:22 +00:00
Brian Wilkerson ed3d0e7483 Convert StaticMemberContributor to use SuggestionBuilder
This also removes the use of an ElementVisitor.

Change-Id: I9589a4f8fb66ce365ed911a86d3a6f832c189dbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146380
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-04 19:17:54 +00:00