Commit Graph

68 Commits

Author SHA1 Message Date
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Brian Wilkerson d00ef8611a Update the server protocol to support passing back the line and column numbers for the end of a range
Change-Id: I8310e4a32cacbe98310c1dbaa3b3563b1ff1a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191862
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-18 19:22:23 +00:00
Konstantin Shcheglov 7bbab07bea Outline for non-function type aliases.
Change-Id: I1a8ef42e700fa84ac7a249268cdbd3aa72921c1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-28 07:28:50 +00:00
Sam Rawlins 6103487f9e Remove unused imports with shared prefixes
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: I2c5477bbb36b17ad9ac4cf5e9584dd66f66afe1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-10-21 19:37:34 +00:00
Konstantin Shcheglov 90ce990409 Simplify Flutter support to a single instance.
Change-Id: I90813c4e01694510971c4ce9cf96a4a3380a2923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153952
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 17:21:24 +00:00
Brian Wilkerson 8969b1839c Enable omit_local_variable_types in analysis_server
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:58:44 +00:00
Brian Wilkerson f60536c194 Enable slash_for_doc_comments in analysis_server
Change-Id: Id2734d4c9ce591c5746bb9aa55810c78183db38f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-14 17:17:17 +00:00
Brian Wilkerson bff11ba6ec Enable always_declare_return_types in analysis_server
Change-Id: I9b06753cf552c9f50ea2abd7f3fa5ba9adecb526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134085
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 17:45:24 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Brian Wilkerson 17e15ee9a4 Add outline support for extensions
Change-Id: I1b7145e899614b3d73d3fc2bfbe3dd7f773d38d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109880
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-07-22 21:12:40 +00:00
pq c2ff2ca16d collection API use de-linting
Change-Id: I8879f48d484830ff594295b983363b7e3245f092
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108668
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-10 22:49:10 +00:00
pq 52abcd3dd2 apply prefer_equal_for_default_values
Change-Id: I9b6fd3ee18ec834a5db3d0d25455b6db9ea4fbe2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108664
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-07-10 19:31:40 +00:00
Konstantin Shcheglov fd76dda221 Identify mobile or web Flutter correctly when both are possible.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/131257401
Change-Id: Ifccb54504e7551009cdc3a66dd454e653d3cdd4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100663
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-27 16:52:56 +00:00
Konstantin Shcheglov 3124125008 Move Flutter utility methods into a class, which can be instantiated either with regular package:flutter, or with package_flutter_web.
The factory constructors does not yet choose one, will do in a
following CL.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36056
Change-Id: I7fabe9da571ea80ce993d9303217ccd8b085e8a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95283
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-05 05:51:41 +00:00
Brian Wilkerson 4a144e631f Fix production of outline for incomplete generic function types (issue 36059)
Change-Id: Ie8e5279fb7b9094377197ee9d0f568f8baad3d10
Reviewed-on: https://dart-review.googlesource.com/c/95080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-02 01:37:32 +00:00
Brian Wilkerson 47e988b781 Clean up the remaining copyright notices in analysis_server
Change-Id: Iee3110f92ab0f24312ddd1eff407d2229f895321
Reviewed-on: https://dart-review.googlesource.com/c/89101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-11 15:38:56 +00:00
Konstantin Shcheglov da191665aa Issue 34709. Support generic type alias (AKA generic function type alias for now) in outline and completion.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34709
Change-Id: Ic18d98e07ba0cbd231ded27c4c32533ee013632b
Reviewed-on: https://dart-review.googlesource.com/c/84320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-11-13 21:20:08 +00:00
Brian Wilkerson e9504d2857 Add outline support for the new mixin syntax
Change-Id: I75d020f613daf37812ccf805d75e35091a28c198
Reviewed-on: https://dart-review.googlesource.com/72524
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-31 21:53:15 +00:00
Brian Wilkerson 87f753dbd3 Replace some declarations of element with declaredElement
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-02 16:00:36 +00:00
Brian Wilkerson 54e241d71f Deprecate more AST API and replace uses of it
Change-Id: I6ecf17853915e4b61ee39f25d99451b78d2ba4ac
Reviewed-on: https://dart-review.googlesource.com/66401
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-24 15:51:18 +00:00
Konstantin Shcheglov 819b212318 Issue 33228. Fix Dart2 error in outline computer.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33228
Change-Id: Ifa328eee5cbc398ada9cfee0a582f169b140434e
Reviewed-on: https://dart-review.googlesource.com/56625
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-24 21:36:32 +00:00
Konstantin Shcheglov 67d3e4e3a1 Use actual names of the @isTest of isTestGroup executable in outlines.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Ifcd9d2398ca4e80cdace115e36f0d27df1afaad4
Reviewed-on: https://dart-review.googlesource.com/53825
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-05-04 20:11:16 +00:00
Konstantin Shcheglov b7a63c8d52 Use @isTest and @isTestGroup to understand executable element as a test/group.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2055
Change-Id: I7c8e7639d111eca63df0780ebdec182573493047
Reviewed-on: https://dart-review.googlesource.com/53690
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-04 17:09:06 +00:00
Brian Wilkerson c214c43758 Make LineInfo a public class
Change-Id: I1bc7f5302797374609752ea5293b96c30719b41f
Reviewed-on: https://dart-review.googlesource.com/51101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-13 16:23:47 +00:00
Brian Wilkerson 39395f911b Send type parameters for functions in outlines
Change-Id: Ie11d739a41408903390ac2c1434d05fd7dccca0e
Reviewed-on: https://dart-review.googlesource.com/48267
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-24 14:54:13 +00:00
Konstantin Shcheglov e1909cb52a Update Outline protocol - change offset/length, add codeOffset/codeLength.
R=brianwilkerson@google.com

Change-Id: I4b5c03a21254f7c497adc4c043641b18599c5c39
Reviewed-on: https://dart-review.googlesource.com/45764
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-09 01:52:57 +00:00
Brian Wilkerson 1d159e7c23 Rename annotation testing methods in Element
Change-Id: I0f60b9abd3de350e62d89eac0d690a1db40316b7
Reviewed-on: https://dart-review.googlesource.com/45080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-05 17:23:48 +00:00
Konstantin Shcheglov 07367d05cd Basic implementation of FlutterOutlineComputer.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I22c96c2a35c086814aace13f0121cc0361f3386f
Reviewed-on: https://dart-review.googlesource.com/36140
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-21 18:12:58 +00:00
Konstantin Shcheglov 6b1658906e Support for Flutter is not limited to code correction. Move to utilities.
R=brianwilkerson@google.com

Bug:
Change-Id: Idaa90946710fcbec2a35a91eb35b5ead68cf4170
Reviewed-on: https://dart-review.googlesource.com/16621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-25 19:11:38 +00:00
Konstantin Shcheglov 4c86f98d7a Drop the 'Flutter' word from names, expect that clients will use the 'flutter' import prefix.
R=brianwilkerson@google.com

Bug:
Change-Id: I0275557bad66f03ed0d1b8388119b168d70bfad4
Reviewed-on: https://dart-review.googlesource.com/16600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-25 17:14:01 +00:00
Konstantin Shcheglov c2f1af6378 First steps for computing Flutter outlines.
R=brianwilkerson@google.com, devoncarew@google.com

Bug:
Change-Id: Ib8151df40439a28da536d467a5c0e7354fcfba51
Reviewed-on: https://dart-review.googlesource.com/16338
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-25 17:00:56 +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 f6e3e1f549 Add outline support for the test package
Change-Id: Iff938d55082b3b222cf801ea53d4eaf5feb1e094
Reviewed-on: https://dart-review.googlesource.com/6980
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-09-19 18:59:54 +00:00
Brian Wilkerson c38c97def3 Reduce duplicated code
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3002303002 .
2017-08-25 08:18:39 -07:00
Brian Wilkerson fb982f5476 Make server use the common protocol classes
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2879273002 .
2017-05-15 09:35:46 -07:00
Brian Wilkerson e55812a3f2 Unify the server and plugin versions of the generators
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2844273003 .
2017-04-28 07:46:29 -07:00
Brian Wilkerson 22f561e914 Reapply "Add support for generic function type syntax, part 1"
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2622303006 .
2017-01-11 14:10:05 -08:00
Brian Wilkerson 85b1e7abbe Revert "Add support for generic function type syntax, part 1"
Review-Url: https://codereview.chromium.org/2624283003 .
2017-01-11 13:30:52 -08:00
Brian Wilkerson 1cd918533d Add support for generic function type syntax, part 1
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2613383003 .
2017-01-11 13:12:10 -08:00
Brian Wilkerson 7a9b2a3133 Use null aware operators to clean up code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1941793002 .
2016-05-02 08:38:46 -07:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Konstantin Shcheglov 2f0f398c73 Fix lints: unnecessary_brace_in_string_interp
Also fixes two cases of empty_constructor_bodies.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1521883002 .
2015-12-13 13:05:00 -08:00
Brian Wilkerson 9ad256cf18 Move the wire protocol support into the public API
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398293002 .
2015-10-11 07:34:28 -07:00
Konstantin Shcheglov e090ff872e Issue 24277. Use node's offset as the source range start for the first unit node in Outline.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24277

Review URL: https://codereview.chromium.org//1325143003 .
2015-09-02 17:55:15 -07:00
brianwilkerson@google.com 4dac0013c0 Fix hints
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1008583002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44447 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 21:58:22 +00:00
scheglov@google.com 2e77fcdd11 Add an optional 'typeParameters' to Element.
Also use it in Editor, e.g. in Outline.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//990343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44349 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 22:02:44 +00:00
brianwilkerson@google.com cd58e290c4 Reformat
R=paulberry@google.com

Review URL: https://codereview.chromium.org//969113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00
scheglov@google.com 6a78250c64 Issue 22476. Outline for enums.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22476

Review URL: https://codereview.chromium.org//934353002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43853 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 21:37:27 +00:00
scheglov@google.com 96462aab53 Send notifications using separate server operations.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//847663005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42970 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 20:11:47 +00:00