Danny Tuppeny
9ee052fbeb
Add toString/equals/hashCode
...
Change-Id: I54a07a61b00462a05a1382e598e77e8c177befc0
Reviewed-on: https://dart-review.googlesource.com/c/83741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-11-08 17:07:19 +00:00
Danny Tuppeny
d5e853e0ce
Improve parsing of LSP spec
...
Change-Id: Ica48b57c890105df346c5a133fe0389bd92dbb6e
Reviewed-on: https://dart-review.googlesource.com/c/83388
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-08 15:31:26 +00:00
Danny Tuppeny
04777b58cc
Add analysis (publishDiagnostics) and handling of opening/editing/closing files
...
Change-Id: I6dadf125b1a71c4f321f4ab9a01ff2bbfcbd1d4a
Reviewed-on: https://dart-review.googlesource.com/c/82500
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-08 08:52:48 +00:00
Konstantin Shcheglov
09435f21fc
Update member sorter to support mixins and generic type aliases.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ia417b003321d4b92f92b125a4607634fa6d21206
Reviewed-on: https://dart-review.googlesource.com/c/83464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-07 19:36:06 +00:00
Brian Wilkerson
bb2ecb718d
Cleanup deprecation warnings in edit_dartfix
...
Change-Id: I38708afc62b9085ae70e1e5f73728531e63df82f
Reviewed-on: https://dart-review.googlesource.com/c/82792
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-07 17:16:08 +00:00
Paul Berry
be7983e148
Merge commit 'c24073f442e7c7b789894ad8210aff8accc36702' into analyzer
2018-11-07 07:37:12 -08:00
Brian Wilkerson
22408c6dee
Remove references to previewDart2
...
Change-Id: Id382dd95d3ae90d483467741b5b6d3dbc6c31ea1
Reviewed-on: https://dart-review.googlesource.com/c/83300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-07 14:52:37 +00:00
danrubel
7e6a39fd91
Generate analysis server notification handler
...
... and generate the analysis server protocol version
Change-Id: I585e50cc854d5ae1aa7440a14f856c983bbfc93a
Reviewed-on: https://dart-review.googlesource.com/c/83180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-11-06 23:04:53 +00:00
Paul Berry
2aa4b1a4f4
Convert analysis_server.dart to triple-slash comment style.
...
Change-Id: I49ca2b705ad0b59d9a01615b6426fc76db99f77b
Reviewed-on: https://dart-review.googlesource.com/c/82948
Auto-Submit: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-06 15:07:13 +00:00
Paul Berry
85d225e3f6
Move parameter context into NodeLintRule and make it required.
...
This is a breaking change, so the analyzer major version number is
bumped. However, we don't need to publish a new analyzer yet so we
use a "-dev" version number.
This breaking change requires upgrading to the latest version of the
linter package.
Change-Id: I90637068acee646c41613e7b7f7d66496bb260e9
Reviewed-on: https://dart-review.googlesource.com/c/82946
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-11-05 23:32:47 +00:00
Konstantin Shcheglov
3166d6bf25
Replace ResolvedUnitCache with AnalysisSessionHelper.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ie19de8feaf82e97065d1068d0c1a06bdf3654e1d
Reviewed-on: https://dart-review.googlesource.com/c/82940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-05 20:49:44 +00:00
Brian Wilkerson
1215f239c8
Remove references to ContentCache from analysis_server
...
Change-Id: Ie1e107467f639e9a005c7b16055541d235ac38d8
Reviewed-on: https://dart-review.googlesource.com/c/82921
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-05 18:17:57 +00:00
Paul Berry
40dee8da38
Merge commit '11707cab410906df65b72e94fd59b2f51690c9e7' into analyzer
2018-11-05 10:00:59 -08:00
Dan Rubel
40de40f904
Update edit.dartfix to handle InconsistentAnalysisException
...
Fix https://github.com/dart-lang/sdk/issues/35055
Change-Id: I20e8bd6400fdd5e26573d2e9273025acfa6b0b88
Reviewed-on: https://dart-review.googlesource.com/c/82882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-11-05 17:28:02 +00:00
Dan Rubel
11707cab41
Add edit.dartfix test for moveTypeArgument
...
... and address comments in
https://dart-review.googlesource.com/c/sdk/+/82741
Change-Id: Icbe7e2e2157bc31579204e9d0202c2e37cdb4be0
Reviewed-on: https://dart-review.googlesource.com/c/82881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-11-05 16:31:10 +00:00
Dan Rubel
c7e6cdf81c
Update RemoveTypeArguments priority for edit.dartfix
...
Change-Id: I2b3b52916a4eb08a47f40e1adc2ce21985649ba3
Reviewed-on: https://dart-review.googlesource.com/c/82880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-05 16:31:10 +00:00
Paul Berry
b1cbfab274
Merge commit '9a1a7763f150e92e39a05519be47e581584c5de9' into analyzer
2018-11-05 04:01:07 -08:00
Brian Wilkerson
dff53c12d0
Remove more uses of package:analyzer/analyzer.dart
...
Change-Id: I4b8abf72994d7a60b09529a740bd16b591813807
Reviewed-on: https://dart-review.googlesource.com/c/82800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-04 19:36:36 +00:00
Brian Wilkerson
25e0c7b3f9
Split apart the assist tests
...
Change-Id: I249064b4c9215bdb2ed8bc7a68d9cca4e47d6bcd
Reviewed-on: https://dart-review.googlesource.com/c/82791
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-11-03 19:10:40 +00:00
danrubel
68e2cdc3e6
Add edit.dartfix test
...
Change-Id: I71b886e0b15914585ef6a65e30145fee38b4b077
Reviewed-on: https://dart-review.googlesource.com/c/82741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-11-03 00:17:43 +00:00
Konstantin Shcheglov
3f431de188
Implement AnalysisSessionHelper.getElementDeclaration() using AnalysisSession.
...
Also adds parsedUnit / resolvedUnit to ElementDeclarationResult, because
Analysis Server use case shows that we need them.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I845e85f658bec8fdaf3378f879e3d986a0bc01eb
Reviewed-on: https://dart-review.googlesource.com/c/82712
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-02 22:52:49 +00:00
Konstantin Shcheglov
b71948faee
Consolidate MockSdk(s) into one, living in analyzer/lib/src/test_utilities.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I70946b8e6f790608ad52c8f27cd6f506673f7b0d
Reviewed-on: https://dart-review.googlesource.com/c/82710
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-02 21:52:44 +00:00
Konstantin Shcheglov
2784473939
Fixes and tests for quick fixes in mixins.
...
I hit an exception in Analysis Server, so looked at it and related places.
R=brianwilkerson@google.com
Change-Id: Ife9bac50f8ea16aa0a092de0fdbc74c0c1534b23
Reviewed-on: https://dart-review.googlesource.com/c/82700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-02 18:56:49 +00:00
Paul Berry
73a58c81d4
Merge commit '31d0896a8b8c7d2a8c0496c9d8d817356ef897ad' into analyzer
2018-11-02 10:44:56 -07:00
Paul Berry
31d0896a8b
Introduce API so that the linter can be migrated away from Element.context.
...
The API change requires adding a "context" parameter to
NodeLintRule.registerNodeProcessors. If we did this naively it would
be a breaking change since the existing linter code overrides this
method with an implementation that doesn't accept such a parameter.
So to avoid making this a breaking change, we introduce a new
interface NodeLintRuleWithContext that extends NodeLintRule, and adds
the context to the registerNodeProcessors method as an optional
parameter. The analyzer will only pass in the new parameter if the
lint rule implements the new interface; otherwise it will call the
method in the old way. This will allow the linter to be migrated to
use the new API at its pace.
The next breaking change version of the analyzer will change both
NodeLintRule and NodeLintRuleWithContext so that the context parameter
is required, and will pass in a context unconditionally. At a later
date, after the linter has been fully migrated to the new analyzer
version, we will be able to switch back to NodeLintRule and deprecate
NodeLintRuleWithContext.
Change-Id: I75ada0e94e26f831d6f2cb82cddfa706100eb185
Reviewed-on: https://dart-review.googlesource.com/c/82522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-11-02 14:22:12 +00:00
Konstantin Shcheglov
e3c8774543
Add AnalysisSession.analysisContext, stop using AnalysisDriver's AnalysisResult outside the driver.
...
Change-Id: I63138e002d9e777f51d2d843f7ef2b1f32fed3e0
Reviewed-on: https://dart-review.googlesource.com/c/82529
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-02 14:16:31 +00:00
Paul Berry
a4c73e3739
Merge commit '5226b5c307b04da8df96924a46780eb31a5bd75e' into analyzer
2018-11-02 06:06:20 -07:00
Konstantin Shcheglov
1fb58ad61b
Fix CONVERT_DOCUMENTATION_INTO_LINE when there is an empty line.
...
R=brianwilkerson@google.com
Change-Id: Ib5c103426bf5ebb84945816c01e9f5bbcef941ba
Reviewed-on: https://dart-review.googlesource.com/c/82472
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-01 20:25:29 +00:00
Dan Rubel
8c20adffe6
Increment analysis server protocol version
...
Change-Id: I470a51b035c765d710e920f3fe77dfa11a7aca92
Reviewed-on: https://dart-review.googlesource.com/c/82480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-11-01 19:17:04 +00:00
Konstantin Shcheglov
0299b98197
Renames for addPackageFile() / addPackageMeta().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I9d710d76186f5e54592457ac8708551ac096a43a
Reviewed-on: https://dart-review.googlesource.com/c/82465
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-01 17:24:26 +00:00
Danny Tuppeny
d802c7d33d
Improve LSP server tests
...
Change-Id: Ib9c7cd2966c6cf4d0c02e56ec405761f899e6668
Reviewed-on: https://dart-review.googlesource.com/c/82441
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-01 17:08:16 +00:00
Konstantin Shcheglov
5711a1d539
Move implementations of analysis results into src/results.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I7527dfb597ff54802517093b4aa526b14e7b705c
Reviewed-on: https://dart-review.googlesource.com/c/82461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-11-01 16:11:23 +00:00
Konstantin Shcheglov
d6d312cca6
Add 'Wrap with StreamBuilder' quick assist.
...
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I109bfe41344943b6d1b456cb178f1db4d5e92858
Reviewed-on: https://dart-review.googlesource.com/c/82341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-01 15:33:04 +00:00
Danny Tuppeny
8852d36315
Add --lsp flag to analysis server and add basic Initialize handler
...
Change-Id: Iaf6c2a7cd56dea27233c4be1df2da900653e1822
Reviewed-on: https://dart-review.googlesource.com/c/81275
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-31 20:00:51 +00:00
Brian Wilkerson
dee5e8a070
Convert more classes to mixins
...
Change-Id: I85bee426236a510305fc38a49b2f9348af7698df
Reviewed-on: https://dart-review.googlesource.com/c/82181
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-31 13:49:51 +00:00
Konstantin Shcheglov
c843a4fdbd
Replace resourceProvider.convertPath() with just convertPath() where possible.
...
R=brianwilkerson@google.com
Change-Id: I80c349b0ed9092e455ca2d811f5828765361ffc7
Reviewed-on: https://dart-review.googlesource.com/c/82163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 23:55:26 +00:00
Konstantin Shcheglov
87ee9c2c7d
Don't generate library directive in CREATE_FILE.
...
R=brianwilkerson@google.com
Change-Id: Ia2853119ac119cfeff4c72f2528ebe6bc51745e4
Reviewed-on: https://dart-review.googlesource.com/c/82161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 22:01:44 +00:00
Brian Wilkerson
56861d5c98
Additional cleanup following session api change
...
Change-Id: I838c840ca001231890ea6fd3591de446f24c3d1d
Reviewed-on: https://dart-review.googlesource.com/c/82160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-30 20:16:15 +00:00
Brian Wilkerson
298d22f4ab
remove async parse method
...
Change-Id: I7a2e633b43283221790fb88a12065fed3dcdabb7
Reviewed-on: https://dart-review.googlesource.com/c/82120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-30 19:26:00 +00:00
Konstantin Shcheglov
dfb4427c03
Fix an error in analysis_server MockSdk.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ie80843de5d01ef16b1e92cccde84c542d051d273
Reviewed-on: https://dart-review.googlesource.com/c/82082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 18:39:04 +00:00
Konstantin Shcheglov
ff25f47862
Remove processRequiredPlugins() and configurePreviewDart2().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ic93ba6b148e7bb6e7fc001dc2aceb4feaf8fa29f
Reviewed-on: https://dart-review.googlesource.com/c/82081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 17:40:29 +00:00
Konstantin Shcheglov
1c6774ba34
Create AnalysisDriver in AbstractContextTest using the new API.
...
Change-Id: Ia3b8e0fa297026f8d002cf4b29f179e686876d8c
Reviewed-on: https://dart-review.googlesource.com/c/81980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-30 15:57:59 +00:00
Paul Berry
03df087c60
Merge commit '1215d9163af58229132e4776a89ea87d5302c9e3' into analyzer
...
Conflicts:
pkg/analysis_server/lib/src/edit/edit_dartfix.dart
pkg/analysis_server/lib/src/services/correction/assist_internal.dart
2018-10-29 08:48:27 -07:00
Brian Wilkerson
57c185c89d
Remove remaining uses of Element.context from server
...
Change-Id: Ibc383064951e181fa8e951714904526c2ea42f5f
Reviewed-on: https://dart-review.googlesource.com/c/81749
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-29 14:56:24 +00:00
danrubel
0fe448a996
Revise the analysis server edit.dartfix protocol
...
This updates the edit.dartfix protocol to separate location from the text
describing the changes so that the dartfix client can choose
what location information to display and how it should be displayed.
Change-Id: Ic56a4cb187538571d60136d6de9265d879fccb53
Reviewed-on: https://dart-review.googlesource.com/c/81780
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-29 01:50:27 +00:00
Brian Wilkerson
faa8bcd78c
Finish spliting out the non-lint fix tests
...
Change-Id: I793a9663ad3a9adfec4248844a5881f857fb4c4c
Reviewed-on: https://dart-review.googlesource.com/c/81748
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-28 18:11:37 +00:00
Konstantin Shcheglov
e223bd3628
Replace most of direct uses of MemoryResourceProvider with ResourceProviderMixin.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I87114418b63ef68665b9c3e487980a72db00ec6a
Reviewed-on: https://dart-review.googlesource.com/c/81744
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-27 17:50:10 +00:00
Konstantin Shcheglov
142641e596
Stop using AnalysisContext.getContents() in SelectionAnalyzer.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I3464c88febba778b368061470b5aa80c3037e897
Reviewed-on: https://dart-review.googlesource.com/c/81660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-26 21:49:06 +00:00
Devon Carew
d53b034a64
Fix several analysis lints.
...
Change-Id: If7921d5cfc3dd2af79699f9905d7f3b106254cd0
Reviewed-on: https://dart-review.googlesource.com/c/81722
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-10-26 21:41:35 +00:00
Konstantin Shcheglov
5b1641432d
Create CorrectionUtils only for ResolveResult.
...
So, it is always self-consistent, never ask AnalysisContext for the
unit file content.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I93e71f7f8fa577b8e123c91252f3038a50cdccef
Reviewed-on: https://dart-review.googlesource.com/c/81580
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-26 14:04:12 +00:00