Commit graph

297 commits

Author SHA1 Message Date
Konstantin Shcheglov cc3e062578 Set higher relevance for exact type and subtype completions.
Exact type get the largest relevance boost, subtypes a smaller boost,
and the rest has default relevance for its element kind.

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

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: Ibb38caedc314e9cf476de2116aeb61bcec8c8a08
Reviewed-on: https://dart-review.googlesource.com/43263
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-23 06:05:13 +00:00
Mike Fairhurst 7fdab0de2c Fix issue autocompleting members on dynamic values in ng plugin.
See angular issue #499 for a stack trace. When autocompleting a member
on dynamic, the member contributor checks to find a member definition
higher up in the tree that should lead to specific members to suggest.

However, in the angular plugin, the ASTs passed in are often fragments.
Account for the case where a node has no parent earlier than expected.

Change-Id: Ib30d9f1aef77241224f604c5994489aa9448b0c2
Reviewed-on: https://dart-review.googlesource.com/42884
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-02-22 19:19:47 +00:00
Konstantin Shcheglov 0ce1a92d98 Suggest constructors for implicit creation in previewDart2.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: I43270f47fb43402d1a9e0f7d9814494ffd83bb5e
Reviewed-on: https://dart-review.googlesource.com/43080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-22 18:03:12 +00:00
Konstantin Shcheglov fcccab9199 Filter constructor completions by required type.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: I88eb345bfa7f0a65d135e5fdcb443d5dadd695c5
Reviewed-on: https://dart-review.googlesource.com/42882
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-21 23:12:31 +00:00
Brian Wilkerson 3d183f6999 Add support for selection ranges to ChangeBuilder
Change-Id: Icd4c1bcf2ecb66020a9a7f478a037c478e8a109f
Reviewed-on: https://dart-review.googlesource.com/42024
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-16 19:23:06 +00:00
Brian Wilkerson 0501c740ac Member overrides invoke the overridden member and the display label uses ellipses
Change-Id: I9cb2db1514a8a2798cb3ec69d3d71047573a8dd4
Reviewed-on: https://dart-review.googlesource.com/41903
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2018-02-16 14:12:27 +00:00
Konstantin Shcheglov 4232ac99e8 Fix for surround-with linked edit positions.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32106
Change-Id: Ia899171aa38dd1283b72cdd100a0f5b678e9b565
Reviewed-on: https://dart-review.googlesource.com/41420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-14 18:55:33 +00:00
Brian Wilkerson ae5534a394 Handle cases where a non-dart file is being edited (issue 32160)
Change-Id: Icd7d1ff0ecb4515163281c9a85a1b1927e864fbe
Reviewed-on: https://dart-review.googlesource.com/41400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-14 18:27:33 +00:00
pq 35221ce1fc Override completion displayText implementation.
Change-Id: If19ccb00145ec4befec2be575af48709f122b511
Reviewed-on: https://dart-review.googlesource.com/40510
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-13 19:15:26 +00:00
Konstantin Shcheglov c1d5d843af Add identifiers for Quick Assists.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I07cd18ae38f98793f960a2c7bd971527eaa6d7d6
Reviewed-on: https://dart-review.googlesource.com/40140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-12 20:56:09 +00:00
Konstantin Shcheglov 7cffd55c41 Don't suggest anything right after double or integer literals.
R=brianwilkerson@google.com, danrubel@google.com

Change-Id: Ib8b9091daedb1e1921ae3c454e83a5b96d94a71a
Reviewed-on: https://dart-review.googlesource.com/40471
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-02-12 01:18:35 +00:00
Konstantin Shcheglov 456890cd2c Enable completion in AssertInitializer.
R=brianwilkerson@google.com, danrubel@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/1101
Change-Id: Id17a701cac0e98afc373cf89089916cf5f983cff
Reviewed-on: https://dart-review.googlesource.com/40472
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-12 01:01:31 +00:00
pq 06614a7b19 Proposed API for optionally building override cc displayText.
Change-Id: Ic3ea3317da1220c7d396348ae93e40ab672ecc59
Reviewed-on: https://dart-review.googlesource.com/40500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-11 18:01:13 +00:00
pq bea00e5bb3 (Re)-generate Server APIs.
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/40101

Change-Id: I6aa8fd474bfa4b5529f1a1f1d664f29f84e56331
Reviewed-on: https://dart-review.googlesource.com/40462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-09 18:53:08 +00:00
pq a4ecc44c30 Completion protocol API for overrides.
Proposed API to allow IDEs to ask a suggestion for a displayText which may differ from the value to insert (the completion).

Also, adds a new OVERRIDE suggestion kind.

See: https://youtrack.jetbrains.com/issue/WEB-31130










Change-Id: Ic0644308d746ac7771bc27bc2ff2789444733af3
Reviewed-on: https://dart-review.googlesource.com/40101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-09 17:57:17 +00:00
Konstantin Shcheglov ffd67154f7 Add a new optional field - 'id' to SourceChange.
R=brianwilkerson@google.com

Change-Id: Ibe85415be35982327593ffd1187ec74b1d037463
Reviewed-on: https://dart-review.googlesource.com/40102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-08 20:13:11 +00:00
Konstantin Shcheglov f6febf35b1 Don't write EOLs before/after new class members.
R=brianwilkerson@google.com

Change-Id: Ie70423802985fc762fea2cb55a2936a3e3f3add0
Reviewed-on: https://dart-review.googlesource.com/39851
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-08 00:40:11 +00:00
Brian Wilkerson 39448ff521 Improve creation of overriding methods (issues 30730 and 30759)
Change-Id: I96a06f6ad2646d4590804c2e5d8d7f6ab95dbd74
Reviewed-on: https://dart-review.googlesource.com/39844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-07 22:16:00 +00:00
Lasse R.H. Nielsen 6f78471687 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: I7a12fea533d42b0fc8357086649df38ad01f3cdd
Reviewed-on: https://dart-review.googlesource.com/39140
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-07 06:12:53 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
This reverts commit 0b59f24f97.

Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751

Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
> 
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-06 11:17:46 +00:00
Brian Wilkerson 740a0e751e Rework part of DartChangeBuilder to deal better with type parameters (issue 31199)
Change-Id: I1946e6070c0dcffaa02f61b9c7f857168a050a27
Reviewed-on: https://dart-review.googlesource.com/38483
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-02-05 18:21:36 +00:00
Brian Wilkerson 0916cca7d2 Do not convert return type of enclosing function when adding async to nested closure (issue 30901)
Change-Id: I8293b7784f71d4ff7846a0cca6efbfa69847b7da
Reviewed-on: https://dart-review.googlesource.com/37646
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-30 21:57:10 +00:00
Dan Rubel 1231e90fee Code complete identifiers not directly referenced by the analyzer AST
The fasta parser sometimes "drops" unexpected tokens during recovery.
When this happens, the dropped or skipped token is not reported to
the listeners, and thus does not become part of the analyzer's AST.
These tokens are still in the token stream, but will not be found
by the existing CompletionTarget mechanism.

For example, the fasta parser parses
'if (v i) {}' as 'if (v) {}' and drops the 'i' token.

This CL introduces a new CompletionTarget.droppedToken field.
If a keyword or identifier has been dropped by the parser,
but overlaps the code completion offset, then that token
is placed into this new field.

In the example above, when code completing the 'i',
the CompletionTarget will now be
containingNode = '(v)'
entity         = ')'
droppedToken   = 'i'

Change-Id: I15e43529ab4a72de9500c521be278fa13ae68d99
Reviewed-on: https://dart-review.googlesource.com/31285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-22 21:55:35 +00:00
Lasse R.H. Nielsen 847cf039f0 Lower-case Isolate.{IMMEDIATE,BEFORE_NEXT_EVENT}.
Change-Id: I9a7071a7f6dc61b502f5aa9bc9bc2455247a7513
Reviewed-on: https://dart-review.googlesource.com/22984
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-24 12:44:17 +00:00
Brian Wilkerson b5ba13202d Add a description of the packages used to implement a plugin
Change-Id: Ibb5207e93e7c12560cd9be6845c63a3d50e23df5
Reviewed-on: https://dart-review.googlesource.com/18780
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2017-11-06 14:11:59 +00:00
Brian Wilkerson c6c7580c92 Add error detection and reporting for errors related to plugins
Change-Id: If17e88b64022fe71c992c5867c80263c0e6b953b
Reviewed-on: https://dart-review.googlesource.com/18781
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-05 19:21:07 +00:00
P.Y. Laligand ce79a77331 Remove Fuchsia-specific build files.
Also fix Fuchsia tools to account for new project location (//third_party/dart).

Change-Id: If89a934729c4fa44229eaca83219dbdf8bb700a8
Bug:
Reviewed-on: https://dart-review.googlesource.com/14800
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-19 17:52:37 +00:00
Devon Carew 47a861ca85 Add two new element types to the protocol.
Bug:
Change-Id: I5a60081d7c8500590bbabb9ee6dce74fa611b0a3
Reviewed-on: https://dart-review.googlesource.com/14883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-18 19:02:47 +00:00
Devon Carew a5c2256455 Send test element kinds for test outline items.
Bug:
Change-Id: Iebea8d4b9705c726e297722ef1678e1a2cd1ea96
Reviewed-on: https://dart-review.googlesource.com/12841
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-11 17:00:41 +00:00
Brian Wilkerson b3439aa20b Guard against broken code (issue 31023)
Change-Id: I9f53abb1257a3ffc86dc4bf46e2591c7f936d1fe
Reviewed-on: https://dart-review.googlesource.com/11940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-06 17:28:04 +00:00
Konstantin Shcheglov e925eb125c Fix type code for typedefs after switching to GenericTypeAliasElement.
https://dart-review.googlesource.com/c/sdk/+/9421

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

Bug:
Change-Id: I25d60ff904f15e6eeefff97b08ba9870d69733db
Reviewed-on: https://dart-review.googlesource.com/9460
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-29 04:27:53 +00:00
Brian Wilkerson 3ee522935d Add suffix to remove the possibility of contention over byte stores in plugins
Change-Id: I448eaac6d9525432a6b154729abcaef62f0332ee
Reviewed-on: https://dart-review.googlesource.com/8260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-09-25 21:19:39 +00:00
Konstantin Shcheglov 455984bbf9 Fix fuzzy arrow warnings in analyzer and analysis_server.
There is one warning which I'd like to fix in a separate CL.

The rest is because of package:test predicate().
I think Leaf fixed it in 3625f13698


R=brianwilkerson@google.com

Bug:
Change-Id: I060f7ced55dbcc460185916251c47ebbd5c838d3
Reviewed-on: https://dart-review.googlesource.com/3404
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-06 00:26:18 +00:00
Brian Wilkerson 2d204c548b Documentation for the kythe support
R=jwren@google.com

Review-Url: https://codereview.chromium.org/3004743002 .
2017-08-28 10:14:47 -07:00
Brian Wilkerson 37042bb59b Add an integration test for kythe support with bug fixes
R=jwren@google.com

Review-Url: https://codereview.chromium.org/3006693002 .
2017-08-28 10:07:04 -07:00
Brian Wilkerson 608bf972b0 Add folding support for plugins and update the main tutorial page
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004733002 .
2017-08-28 08:05:37 -07:00
Brian Wilkerson d1a2a43d54 Add plugin support for occurrences (and fix typo)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3006703002 .
2017-08-28 08:04:42 -07:00
Brian Wilkerson 86918d713b Add SourceRange support to navigation collector
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3002343002 .
2017-08-27 12:31:13 -07:00
Konstantin Shcheglov f78d43c3d3 Convert GeneratedContent to async and use AnalysisDriver for tasks graph.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/3002293003 .
2017-08-26 07:51:34 -07:00
Brian Wilkerson 1f552d8c96 More clean-up prior to publishing
Review-Url: https://codereview.chromium.org/3006633002 .
2017-08-25 14:11:42 -07:00
Brian Wilkerson f64000374d Update pubspecs prior to publishing
R=devoncarew@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/3006623002 .
2017-08-25 13:24:17 -07:00
Brian Wilkerson dd00fc7750 Add support for highlights notification
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004613002 .
2017-08-25 09:21:36 -07:00
Konstantin Shcheglov dc60566293 Make finalize() async and await adding imports, if any.
There were two flaky tests for assists because sometimes we managed
to execute adding imports before performing checks in the test. And
in this case there was additional (unexpected) empty file edit for
the library file (the only expected file edit was for the part).

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/3009563002 .
2017-08-24 21:07:34 -07:00
Brian Wilkerson efd4051c7e Add utilities to support the outline notification
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3002233002 .
2017-08-24 11:59:06 -07:00
Brian Wilkerson 4c8fbfad81 Add documentation for the new notification support
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3008493002 .
2017-08-24 11:26:36 -07:00
Brian Wilkerson c6b206a2d9 Clean up after some recent code changes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3009513002 .
2017-08-24 10:01:11 -07:00
Brian Wilkerson e8010e4a44 Enhance NavigationMixin to handle notifications
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3008443002 .
2017-08-24 07:44:51 -07:00
Brian Wilkerson c53bc9f628 Unify lots of copied code in one utility method
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3008433002 .
2017-08-23 14:25:03 -07:00
Brian Wilkerson 0a50effce5 Add minimal support for sending notifications
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3003573002 .
2017-08-23 13:26:59 -07:00
Brian Wilkerson 4463d646fe Minor enhancement to the plugin tutorials
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2998083002 .
2017-08-18 12:21:44 -07:00
Brian Wilkerson ebe2ce681e Fix ClassElement.allSupertypes to include interfaces of mixins (issue 29767)
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3000183002 .
2017-08-18 07:30:05 -07:00
Brian Wilkerson d87fcfd233 Correctly update positions when adding edits before them (issue 30444)
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2997073002 .
2017-08-16 10:29:26 -07:00
Brian Wilkerson 6f81034a73 Initial Kythe support for plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2997833002 .
2017-08-14 08:24:15 -07:00
Brian Wilkerson ecc72d6be5 Initial implementation of the kythe domain
R=jwren@google.com

Review-Url: https://codereview.chromium.org/2999783002 .
2017-08-10 11:49:22 -07:00
Brian Wilkerson 579a032564 Add kythe support to plugins and format the spec files
R=jwren@google.com

Review-Url: https://codereview.chromium.org/2994103002 .
2017-08-10 11:24:40 -07:00
Brian Wilkerson 1abf749b77 Fix more uses of generic method comments and increment the data version (TBR)
Review-Url: https://codereview.chromium.org/2996653002 .
2017-08-08 11:27:02 -07:00
Paul Berry e2f77056a5 Eliminate dependencies on pkg/front_end.
The API for pkg/front_end is still in flux so we want to avoid having
any packages depend directly on it (other than analyzer and
back-ends).

This CL re-exports some of the critical pieces of front_end needed by
analyzer clients so that those clients can access them via analyzer,
without having to directly depend on front_end.  It also updates
pkg/analyzer_plugin to make use of those re-exports.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2993123002 .
2017-08-07 09:46:30 -07:00
Brian Wilkerson 4e1644f12a Add more documentation for plugins
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2992843002 .
2017-08-02 07:45:45 -07:00
Brian Wilkerson adb482002b Prevent exception with isolate failed to start
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2986123002 .
2017-07-28 08:26:31 -07:00
Brian Wilkerson 9a6b134d33 Improve name generation for indexed expressions
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2990793002 .
2017-07-27 07:58:34 -07:00
Brian Wilkerson cc7b83f4da Mark refactoring support for plugins as experimental
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2990573003 .
2017-07-26 07:43:55 -07:00
Brian Wilkerson 8bbf373a5e Remove the analysus.reanalyze request from the plugin API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988743002 .
2017-07-25 12:10:52 -07:00
Brian Wilkerson 1e0e351406 Fix a typo in the docs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988683002 .
2017-07-24 09:54:23 -07:00
Brian Wilkerson 8a275e6df8 Add utility method to SubscriptionManager
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2983913002 .
2017-07-21 07:24:55 -07:00
Konstantin Shcheglov 00d5012906 Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...instead of mixing formatting with actual changes in many CLs.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Brian Wilkerson 0c775ae412 Guard against an AST node with no end token (issue 30089)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2974533002 .
2017-07-06 12:51:23 -07:00
Konstantin Shcheglov 19265a82b4 Move findElementsByName() into shared analyzer/element_search.dart file.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2965133003 .
2017-07-06 11:51:17 -07:00
Brian Wilkerson 0484f28335 Initial documentation for the plugin package
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2973753003 .
2017-07-06 11:37:52 -07:00
Konstantin Shcheglov 6323bedc58 Stop depending on LabelElement(s) to be reported in visitChildren().
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2973093002 .
2017-07-06 11:28:06 -07:00
danrubel 8cca317118 fix completion test expectation for fasta scanner
Review-Url: https://codereview.chromium.org/2972063002 .
2017-07-06 14:07:49 -04:00
Brian Wilkerson 75504c2b25 Remove references to AnalysisDriver from the plugin mixin classes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2970203002 .
2017-07-06 09:07:10 -07:00
Brian Wilkerson 6a7b9f441b Convert DartChangeBuilder to use AnalysisSession
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2969833002 .
2017-07-03 08:41:40 -07:00
Brian Wilkerson aadafd1bd5 Use DartEditBuilder to write types and remove dead code
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2972463003 .
2017-07-01 12:03:44 -07:00
Brian Wilkerson 6f4420562c Clean up some code in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2967683002 .
2017-06-30 10:39:20 -07:00
Brian Wilkerson 6248df44a6 Add the tests of the spec generator to the unit tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2966623003 .
2017-06-30 10:08:51 -07:00
Brian Wilkerson 4749014b06 Remove an unused request and the associated type
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2964113003 .
2017-06-30 09:44:59 -07:00
Brian Wilkerson 99cc563718 Update the spec to deprecate fileStamp
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2964653002 .
2017-06-30 08:21:47 -07:00
Brian Wilkerson 47244b4215 Stop creating unnecessary Source
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2969543003 .
2017-06-30 08:20:51 -07:00
Brian Wilkerson d1bb233f52 Remove timeStamp from the ChangeBuilder API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2962223002 .
2017-06-29 13:48:46 -07:00
Brian Wilkerson 84dd01904d Missed change to conform to other APIs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2965453002 .
2017-06-29 06:15:38 -07:00
Brian Wilkerson 7bd9e6c443 Add a mixin for assists similar to that for fixes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2956353002 .
2017-06-28 11:44:22 -07:00
Brian Wilkerson 6248e7cab2 Add support code to make fixes easier in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2962903002 .
2017-06-28 10:52:06 -07:00
Brian Wilkerson 9ddb832e10 Generate constants in server as we do in plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2960073002 .
2017-06-28 08:21:33 -07:00
Brian Wilkerson 0ea6b89770 Fix a lint
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2955113002 .
2017-06-27 08:36:59 -07:00
Konstantin Shcheglov 9775892109 Attempt to fix DartEditBuilderImplTest on Windows.
TBR

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2958803003 .
2017-06-26 14:39:41 -07:00
Konstantin Shcheglov a2f18fdb73 Fixes and tests for adding library imports.
R=brianwilkerson@google.com, pquitslund@google.com
BUG= https://github.com/flutter/flutter-intellij/issues/1119

Review-Url: https://codereview.chromium.org/2955913002 .
2017-06-26 13:16:19 -07:00
Brian Wilkerson 4a10003924 Update the plugin API
R=maxkim@google.com, mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2953093002 .
2017-06-23 12:31:00 -07:00
Brian Wilkerson 8cd2a4924d Disable a not-yet-defined lint
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2955583002 .
2017-06-23 09:37:34 -07:00
Brian Wilkerson e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
Brian Wilkerson 24996fbfe7 Add support to pass the location of the analysis options file to plugins
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2947743002 .
2017-06-20 07:41:03 -07:00
Brian Wilkerson 5976c78a79 Handle unresolved constructor (issue 29925)
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2944083002 .
2017-06-20 06:16:23 -07:00
Brian Wilkerson eafc070479 Remove ReplacementRange
R=danrubel@google.com, maxkim@google.com

Review-Url: https://codereview.chromium.org/2946573003 .
2017-06-19 10:15:36 -07:00
Max Kim 382ddb21c3 Refactor: Removed ReplacementRange from test and ReplacementRange from src/. Copied contents of test into lib/utilities and modified test path.
This is needed to expose ReplacementRange outside of test folder for external plugin users to utilize. Reason discussed further in ticket: https://codereview.chromium.org/2934133002/

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

Review-Url: https://codereview.chromium.org/2937093002 .
2017-06-16 11:19:27 -07:00
Max Kim e57d9b608f Change to accommade Angular plugin and finalize removal of dependency to analysis_server
BUG=
R=brianwilkerson@google.com, mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2934133002 .
2017-06-13 16:31:39 -07:00
Brian Wilkerson 1e9ae646ff Clean up some hints
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2939723002 .
2017-06-13 09:24:50 -07:00
Brian Wilkerson d824acbf71 Update AssistProcessor to use ChangeBuilder
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2928313002 .
2017-06-12 07:28:02 -07:00
Brian Wilkerson b928683560 Add a couple of lints to the options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2933713002 .
2017-06-11 09:12:48 -07:00
pq b502bb6956 Prioritize required name param completions (flutter-intellij#1049).
R=danrubel@google.com

Fixes: https://github.com/flutter/flutter-intellij/issues/1049
Review-Url: https://codereview.chromium.org/2927343002 .
2017-06-09 10:20:16 -07:00
Brian Wilkerson 0e6586492d Make common tests consistent
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2925273003 .
2017-06-09 08:40:16 -07:00
Brian Wilkerson 624f4d8b3d Add tests for recently added mixins and improve plugin tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2932553004 .
2017-06-09 07:27:16 -07:00
Brian Wilkerson 38e2bf5897 Remove invalid imports of analysis_server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2927923003 .
2017-06-08 10:41:25 -07:00
Brian Wilkerson 6d8b7c8806 Finish refactoring FixProcessor to use ChangeBuilder
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2930793002 .
2017-06-08 07:56:08 -07:00
Brian Wilkerson 91b8b495b3 Add support for fixes
R=maxkim@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2923283002 .
2017-06-08 07:53:06 -07:00
Brian Wilkerson b9529da60e More test fixed (TBR)
Review-Url: https://codereview.chromium.org/2925163002 .
2017-06-07 14:04:29 -07:00
Brian Wilkerson 0d315af354 Try again to fix the bots (TBR)
Review-Url: https://codereview.chromium.org/2926173002 .
2017-06-07 13:15:40 -07:00
Brian Wilkerson 9b0a98fd42 Port a missed piece to remove invalid reference to analysis_server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2930723002 .
2017-06-07 10:06:33 -07:00
Brian Wilkerson dce88b45e7 Fix test tests under windows (TBR)
Review-Url: https://codereview.chromium.org/2930723003 .
2017-06-07 10:01:20 -07:00
Brian Wilkerson 456f790aa7 Add support for implementing getAssists in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2924063002 .
2017-06-07 09:19:47 -07:00
Brian Wilkerson 8a724f7093 Port two completion contributors for use by plugins
R=danrubel@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2927663002 .
2017-06-07 09:14:49 -07:00
Brian Wilkerson a8919b8237 Support a short-hand way to create linked edit groups
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2928723003 .
2017-06-07 09:07:39 -07:00
Brian Wilkerson 6894364917 Add a mixin to handle analysis.getNavigation requests
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2927603003 .
2017-06-06 14:12:59 -07:00
Brian Wilkerson bb143b38c1 Fix another windows-specific test bug (TBR)
Review-Url: https://codereview.chromium.org/2929453002 .
2017-06-06 09:12:22 -07:00
Brian Wilkerson c0b327aadd Fix tests under windows (TBR)
Review-Url: https://codereview.chromium.org/2924843002 .
2017-06-06 08:12:31 -07:00
Brian Wilkerson db0a8a76ae Move CompletionTarget and OpType for use by plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2924703002 .
2017-06-06 07:07:19 -07:00
Brian Wilkerson 691cc1b57a Make navigation support consistent with completion support
R=mfairhurst@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2919293002 .
2017-06-05 12:33:20 -07:00
Brian Wilkerson e6c41e9d3d Add a mixing that handles most of the work for computing completions
R=maxkim@google.com

Review-Url: https://codereview.chromium.org/2924503002 .
2017-06-05 10:25:31 -07:00
Brian Wilkerson e8a5e404c3 Move LocalDeclarationVisitor for use by contributors that will be moved to analyzer_plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2918343002 .
2017-06-05 10:24:54 -07:00
Brian Wilkerson db7d3d0fe7 Move relevance constants for use in plugins
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2923573002 .
2017-06-05 10:10:56 -07:00
Brian Wilkerson 12398ad917 Add completion support for plugins
R=maxkim@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2918613002 .
2017-06-03 09:44:56 -07:00
Brian Wilkerson b5c630426c Update a few more methods in FixProcessor, and fix some bugs in ChangeBuilder
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2916923002 .
2017-06-02 07:36:51 -07:00
Brian Wilkerson f6c6c01211 Update some of the fixes to use ChangeBuilder
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2910683002 .
2017-05-30 08:01:52 -07:00
Brian Wilkerson bbe8892c3b Override ChangeBuilder methods in subclass to specify better type information
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2906373002 .
2017-05-29 17:23:58 -07:00
Devon Carew 8df017b670 Re-gen analysis server specs.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2911783002 .
2017-05-27 12:42:17 -07:00
Brian Wilkerson 7f5e1f260f Add a getNavigation request for plugins
R=mfairhurst@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2908523002 .
2017-05-25 10:51:24 -07:00
Brian Wilkerson 6bff3433b7 Add navigation support in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2902193002 .
2017-05-24 15:06:18 -07:00
Brian Wilkerson a8dc041543 Capture the request time for performance data and support forced shutdown
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2893803004 .
2017-05-19 08:49:47 -07:00
Brian Wilkerson 7e11a13cf5 Add requestTime to responses
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2890163004 .
2017-05-18 10:32:47 -07:00
Brian Wilkerson 091752f158 Register files with new drivers (issue 29641)
Review-Url: https://codereview.chromium.org/2886343002 .
2017-05-18 07:43:47 -07:00
Brian Wilkerson daffcecc11 Pass the sdk path to plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2885993004 .
2017-05-17 08:19:49 -07:00
Brian Wilkerson 7d26ff6d4f Remove some more library directives
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
Brian Wilkerson 4c487c806b Minor cleanup of error reporting in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2887453004 .
2017-05-15 16:48:23 -07:00
Brian Wilkerson e2ebf96aea Stop sharing two types between wire protocols
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2883793002 .
2017-05-15 07:57:27 -07:00
Brian Wilkerson 3085734ef6 Generate common types into a separate library
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2880443006 .
2017-05-13 08:12:14 -07:00
Paul Berry f4d3f6cf45 Remove .iml files from the repository.
These files weren't providing enough benefit compared to the confusion
they were causing by showing up frequently in diffs.

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

Review-Url: https://codereview.chromium.org/2878103002 .
2017-05-12 15:06:18 -07:00
Konstantin Shcheglov a4fd5d814f Extract PerformanceLogger from AnalysisDriver.
I also added the runAsync().

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

Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Paul Berry b5bc14c0b4 Begin writing a TypeInferenceListener interface.
In the long term, this is intended to be used to communicate the
results of type inference from the front_end to analyzer.  In the
short term, it can be used to debug type inference (by uncommenting
the print statements in type_inference_listener.dart).

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

Review-Url: https://codereview.chromium.org/2878733006 .
2017-05-12 13:31:26 -07:00
Brian Wilkerson 2cbcd96327 Allow the common spec types to be in a separate document
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2876023003 .
2017-05-12 12:24:05 -07:00
Konstantin Shcheglov bdedd6768b Add a way to use shared CanonicalName root to deserialize Program.
This allows for example to add SDK into a Program, then load the
"incomplete" Program A that has only the library A, and name sequences
that references SDK classes. Because we look into the nameRoot which
aleady has SDK CanonicalName(s), we can find these names while filling
the link table and use references which point to the existing SDK
AST nodes.  Then we can load another set of library cycles, etc.

At the end we have a set of self-consistent libraries that we can
feed into DillTarget/DillLoader and resolve anothersource target
against it.

This CL is based on https://codereview.chromium.org/2872903005/
which has not been reviewed yet.

R=kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2874723002 .
2017-05-12 10:42:08 -07:00
Brian Wilkerson bef53e72e4 Remove unintentional dependency on analysis_server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2875323002 .
2017-05-12 10:07:37 -07:00
Mike Fairhurst e9edd2e568 Fix pubspecs for new analyzer plugin arch dependencies
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2877863002 .
2017-05-11 14:37:46 -07:00
Brian Wilkerson 80eec49e40 Make the plugin request handling async
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2877793002 .
2017-05-11 09:07:06 -07:00
Brian Wilkerson 3b2c3ae5b2 Add support for built-in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2874803003 .
2017-05-10 13:31:20 -07:00
Brian Wilkerson 68b6f9b90d Fix bot failures (TBR)
Review-Url: https://codereview.chromium.org/2869193002 .
2017-05-09 13:51:54 -07:00
Brian Wilkerson 1f893e86a9 Clean up some warnings
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2874443003 .
2017-05-09 13:07:06 -07:00
Brian Wilkerson a70e29ac60 Add support for converting elements to plugin API objects
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2873503007 .
2017-05-09 13:02:31 -07:00
Brian Wilkerson 98e8f17b96 Convert server to use RangeFactory
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2869083002 .
2017-05-09 10:08:14 -07:00
Konstantin Shcheglov bd1ee32543 Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
We are going to reuse ByteStore in front_end, also for incremental
compilation.

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

Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
Brian Wilkerson acbd90b35d Fix tests under Windows (TBR)
Review-Url: https://codereview.chromium.org/2871933003 .
2017-05-09 08:56:20 -07:00
Brian Wilkerson bbb37dae8b Add support for creating source ranges
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2872813002 .
2017-05-09 08:28:09 -07:00