Commit Graph

4618 Commits

Author SHA1 Message Date
Konstantin Shcheglov a2c3ecabce Remove DartSdk.useSummary.
R=brianwilkerson@google.com

Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-30 19:07:32 +00:00
Brian Wilkerson 352f22b06f Convert two more fixes to producers
Change-Id: I4007e7a4931c02cc528a596c85a0da5c6e854c58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 17:59:34 +00:00
Danny Tuppeny 65671edd30 Support publishing errors (diagnostics) for plugins in LSP
This splits Notification manager into an abstract base (which handles merging plugins notifications) and two concrete subclasses that can broadcast the notifications in the correct format for LSP vs DAS protocols.

Change-Id: I5fa2b643adc7bb46db0f06ddd2c997d8a736cbaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149162
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 17:39:06 +00:00
Jaime Wren 77d2a59d8e Add declaredConstructor() to the LocalDeclarationVisitor and mark all declared*() members as concrete with empty bodies. Subclasses are updated in this change as well.
Change-Id: I458968049781830af83d09512a6a1dd75b573070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149391
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-05-29 15:23:46 +00:00
Devon Carew ede9349499 [analysis_server] always send an analytics client ID
Change-Id: I414f5641bcad418b6bfdc1b75d10d3250aeefb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149389
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-05-29 01:19:33 +00:00
Konstantin Shcheglov a56368926e Remove support for 'packageRoots' in DAS.
Bug: https://github.com/dart-lang/sdk/issues/41197
Change-Id: I61929a5853b4e353e3a758fe5088f2ff2c1fda2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 22:57:32 +00:00
Mike Fairhurst 285767744e [analysis_server] No longer report server crashes to staging.
Change-Id: Ic02744c1db5ad6f1daafef7ea8e78559bd20a87a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149383
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 22:44:22 +00:00
Brian Wilkerson 1892a00fe5 Fix the RemoveType quick fix to work with final and const (issue 42099)
Change-Id: I4e933682a821bbe943aacc936a471ed72f9b1d89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149361
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 20:49:27 +00:00
Danny Tuppeny 039581df15 Ensure plugin file types are registered for all LSP capabilities
Change-Id: Ic691aa83ae37700502a6d6de26a1b8a92b071287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149289
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-28 17:10:48 +00:00
Brian Wilkerson b3cec0e400 Incorporate old relevance ideas into context support for new relevance
This doesn't improve the scores in the small app I've been using, but
it does move forward all of the old relevance computation support that
I could find into the new relevance computations.

The other thing done in the old relevance support is some filtering.
For example, in an extends clause, mixins will be filtered out. This
would improve the relevance scores (by reducing the number of
suggestions) but it doesn't seem like it ought to be done as part of
the relevance computation. We should think about a good way to better
filter the suggestions.

Change-Id: Icc671ff033cc5a2d2356c61555844b944d8890b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149204
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-27 21:19:57 +00:00
Konstantin Shcheglov 14f64f9db4 Add CrashReportingAttachmentsBuilder.forException()
R=brianwilkerson@google.com

Change-Id: I66793d61e02d25931d230e8b9e3541255ac6324a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149054
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 15:28:11 +00:00
Konstantin Shcheglov 279024d823 Deprecate InstanceCreationExpression.staticElement
Change-Id: I3c2de8ce22944963418d543b887720db15badd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 22:56:42 +00:00
Konstantin Shcheglov fc1a782168 Remove support for '--package-root'.
Bug: https://github.com/dart-lang/sdk/issues/41197
Change-Id: Ia10946b4db2204cc11e78a1d114578ba79904e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 21:33:32 +00:00
Konstantin Shcheglov 571f564eda Rewrite TypeName to ConstructorName in one place, consolidate error reporting.
Change-Id: I5ea1369d65c5eb47e920f68806d28f34931d372e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 21:32:22 +00:00
Parker Lougheed 47ee7cc316 Remove outdated TODOs related to undesired Element APIs
Change-Id: I7c9bc45ee0e3efd5897da20e8d9555f5c2a1e91a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148984
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 19:02:25 +00:00
Parker Lougheed 172a5d5dc2 Avoid possible exception when removing folder from context
If the folder didn't have a corresponding driver, cannot dispose of it.

Fixes #40336

Bug: https://github.com/dart-lang/sdk/issues/40336
Change-Id: Ia44ec34fcefcee5f66483c3bc97ce33ab8d9300a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148985
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 17:46:28 +00:00
Brian Wilkerson 3329b312c5 Convert another set of quick fixes to the producer model
Change-Id: Ib77901994a186484ec9cbd3496bfa173367304d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148982
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 04:28:09 +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
Konstantin Shcheglov ed84e0b25d Catch InconsistentAnalysisException while computing assists / fixes.
R=brianwilkerson@google.com

Change-Id: I641b507d6ee3b82fcf02167c2f863ad0b57febff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-24 18:01:10 +00:00
Brian Wilkerson 350dd576b1 Add a fix for avoid_unused_constructor_parameters
Change-Id: I6e7e8c8b93a2e37655689a1bf0193061acc00d67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148951
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-24 16:46:52 +00:00
Brian Wilkerson 9e3b028919 Convert several quick fixes to use CorrectionProducer
Change-Id: I125c21f56277904885399b3b7316eec92c77c8bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-24 16:00:48 +00:00
Brian Wilkerson 3fb5f27d05 Extract and enhance the CREATE_CLASS fix
The enhancement is that we can now create a const constructor if the
class to be created is being used as an annotation. We could also do
this if the class were being created from a constructor invocation, but
I didn't do that. This also doesn't handle creating a named constructor,
but I don't think it's any worse than before. If you disagree let me
know.

Change-Id: Idcff7bd0ac8def416b141b49b801f6798548405d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148885
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-22 18:50:06 +00:00
Brian Wilkerson da7b227803 Convert the AssistProcessor to be data driven when using CorrectionProducers
This removes the need to keep the list of lints associated with a given
correction in two places, removing the possibility of those two places
being out of sync. It also fixes one inconsistency that was pre-existing.

Change-Id: Ic5ccbdeaa3eb07b013375cd0e1676fd6f89f57ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-21 18:26:33 +00:00
Konstantin Shcheglov d307e6df88 Fix RemoveTypeAnnotation when used as an assist.
Change-Id: Ic989ca18634783cf59400423bddb331e88a73400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148793
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-21 16:40:00 +00:00
Brian Wilkerson 6b8387b2de Convert the last fix associated with lints to be a CorrectionProducer
Change-Id: Ieb117e07b74933390c02c3dd400976e37f24d616
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148791
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 23:53:40 +00:00
Parker Lougheed bf7e9d13d7 Allow analyzer to fallback to getter documentation for setters
The analyzer server firsts looks for the setter's dartdoc, then the first parent setter's dartdoc, then the closest getter's dartdoc.

Fixes #38963

Bug: https://github.com/dart-lang/sdk/issues/38963
Change-Id: I09f7ae0e5aa49d2536ebefd44dcfd3d6101bb0a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148566
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 23:00:20 +00:00
Nate Bosch f0450f3efc Remove a usage of the quiver package
The quiver package has very little usage in the SDK. Drop the only usage
outside of the nnbd migration tool to clear a path towards removing the
dependency from the SDK entirely.

Change-Id: I54b14d6e887fe6e6b067793e7ee9480793893c27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148788
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 22:53:19 +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 10e14c0377 Add context information to exceptions during computing fixes.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Idfd6aaa1f593cef496ebf0763ff038c1ddae6d80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 20:44:11 +00:00
Brian Wilkerson 1b3aa91c4c Add an is_constant feature to completion relevance
This feature boosts the relevance of suggestions for constant elements
when completion is requested in a constant context.

It didn't have as big an impact as I was hoping for in the small sample
app I'm currently using, but it did have a positive impact, so I think
it's worth adding.

Change-Id: I11eb18be798fc15caf8a33f222a20707aeaee2b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148782
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 19:28:01 +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 94022c4d76 More improvements to computing context type
Change-Id: Iefd3802a87d4de8f84d6f5fcf8d380047773a746
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148513
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-19 19:52:48 +00:00
Paul Berry de5b23d63d Migration: remove abstract interfaces defined by analysis_server for use by nnbd_migration.
These interfaces acted as a temporary bridge to allow analysis server
core classes to provide services needed by nnbd_migration without
forcing analysis_server to depend on nnbd_migration; that in turn
allowed the analysis server to provide migration services to dartfix.
Now that we no longer use the analysis server nor dartfix for
migration, these interface classes are no longer needed.

As of this commit, the nnbd_migration package no longer depends on
analysis_server.

Change-Id: Ia923d91dd59c9a612000da8b0c9ead8a68686d89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Brian Wilkerson 5982d8ef2e Convert more fixes to use producers
Change-Id: If2ebc8a836858ea71dd28a91198cc42dc7a9a5c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148562
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-19 14:37:40 +00:00
Brian Wilkerson 4cdb0d1b45 Convert more quick fixes to producers
Change-Id: Ic93f64cffaa645f3746262eb9f9f53b65361dc0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148460
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 18:37:48 +00:00
Brian Wilkerson 07da1b3542 Make a constant private as per review comment
Change-Id: I792f45016eb8f5c7861e36e77c09978f169a0321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-18 17:23:28 +00:00
Brian Wilkerson 0b9db1c47c Convert a few more fixes to be correction producers
This includes passing the highlight length to the producers and fixing a
couple of existing producers that were impacted by that change.

Change-Id: I1344e372b43ff4b1fb597554737d10fd99f95777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148190
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 17:23:18 +00:00
Brian Wilkerson 86edfbef87 Convert ChangeArgumentName to a producer
The ChangeArgumentName "fix" is one of a small number that can produce
multiple fixes. I'm proposing that we support these by adding objects
that can dynamically produce zero or more CorrectionProducers depending
on the situation being flagged as an error.

Change-Id: I37c06ffefd46f4b8478d127d1b537b3bc840e024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148360
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-17 20:20:17 +00:00
Brian Wilkerson 7a94d1d7f1 Minor cleanup missed with the previous CL
Change-Id: I1c49131651d8984ef8932f3218f5860677569919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148191
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-17 19:06:37 +00:00
Brian Wilkerson b560016446 Fix some issues in the new relevance computations
The code to check the element kind was not being used in a few places
because (a) the generator wasn't always generating a table when it
should and (b) the key for the table wasn't always being set when
creating the OpType. Both of these issues have been mostly addressed.

That required re-generating the element kind tables.

There were several places where context type information wasn't being
used when building suggestions. This has been fixed for all the places
I'm currently aware of.

There were a couple of places where the context type wasn't being
computed where it could have been. I have fixed the places I'm aware of.

Context types were not being computed anywhere because of a bug that
has now been fixed.

There is now one place that computes and caches the context type, which
should improve performance slightly.

I also removed some dead code that I discovered in the process of making
the other changes and cleaned up a couple of places in the code that
were suboptimal.

Change-Id: Ieae8dcc71b986841be3078d6e0b3a653c35384b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148237
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-16 17:15:33 +00:00
Paul Berry c38742cdbc Migration: remove references from analysis_server to nnbd_migration.
Change-Id: I90b562b8b3e82b770f197d7ef2c4e10ac9f99100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148160
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-15 16:49:32 +00:00
Brian Wilkerson 085477c494 Add the ability to get feature data from the completion metrics
Sorry about the size of the CL. I can split it up if you'd like.

In order to do this I added a listener to SuggestionBuilder so that we
could capture the data as suggestions are being built. If it turns out
to be a performance problem we can remove it before shipping it, but it
should only impact the new relevance path, which isn't being used yet in
production.

This splits the "worst" and "slowest" (formerly "longest") results into
three groups. I might find it useful to split them out into more groups
later, but I think this gives me a good place to start.

This also adds a new flag to disable running completions using the old
relevance values. That cuts the time to get data by 1/3 to 1/2.

All off these changes led to a fair bit of refactoring to try to reduce
duplication (both existing and what would have been added if I hadn't
done the refactoring).

Change-Id: I5e8dcbba2c01b3665eb486f183f6ad8014285413
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-13 21:45:47 +00:00
Paul Berry fabceab5ee Migration: remove changedPaths tracking.
See comments in
https://dart-review.googlesource.com/c/sdk/+/147043/1/pkg/nnbd_migration/lib/migration_cli.dart#484
for why this is unnecessary.

Change-Id: I046835d73eb581aecd8d65b1e3248d07daf34f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147702
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-05-13 20:42:56 +00:00
Kevin Moore 0acc564104 Fix a number of URIs referring to dartlang.org
Change-Id: Ie1373e93092023caf5e0bcfd6bb88bfb422d5daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-05-13 18:24:12 +00:00
Brian Wilkerson 7329ebe25e Move an extension into the common place for extensions
Change-Id: Ibc8dc8ed6e9f3e8b8ba81f1cb4ebf02a8488a96a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147760
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-12 16:53:09 +00:00
Simon Binder 10bd820169 analysis_server: Show plugins page in LSP diagnostics
Since the LSP server has basic support for server plugins, it seems
appropriate to enable the plugin page in its diagnostics.

Change-Id: If5fb601023e94a418250bca101240a69da1f0e77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-11 22:36:00 +00:00
Konstantin Shcheglov 2ebd8e22a0 Add DartType.isDartCoreIterable
R=brianwilkerson@google.com

Change-Id: Ia21b8f66bc19467b1b4e84c0cd9d59d6553a58a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-11 22:06:20 +00:00
Danny Tuppeny 994c0e8dad Fix handling of static members in LSP completion
Bug: https://github.com/dart-lang/sdk/issues/41843
Change-Id: Ifb653f9c11a5130e46dce354f7e38490e8e923db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147546
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-11 17:09:07 +00:00
Danny Tuppeny 9678d604c7 Don't included instance fields in completion lists
The LSP completion handler was missing a filter on child declarations that the DAS implementation has. This caused instance fields for classes to show up in the completion list when they should not.

Bug: https://github.com/dart-lang/sdk/issues/41841
Change-Id: Ic4dbf9ba297e665c8b88ba90bb95412b5f51d3a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147545
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-11 17:09:07 +00:00
Simon Binder c7619172b4 Include plugin results in LSP autocomplete
The completion handler will merge plugin results with results from the
Dart contributor.
For non-Dart files, or files that can't be resolved, it will still
request completions for plugins.

I've added a test case for both scenarios and adapted the capabilities
computer to include plugin file endings for completion.

Change-Id: Id55c6fe33c84d6255de3e723f2628510baace0e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-11 17:00:37 +00:00