Commit Graph

897 Commits

Author SHA1 Message Date
Konstantin Shcheglov 5ea30b4e3d Rename performace_logger.dart to performance_logger.dart
R=paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov c5722c682b Don't propose the 'Remove Type' Quick Assist when there is no initializer.
R=brianwilkerson@google.com

Bug:
Change-Id: If87a9b171ac0672772ee971051687a171c0bcd06
Reviewed-on: https://dart-review.googlesource.com/18510
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:13:00 +00:00
Konstantin Shcheglov 2470d9fc74 Don't suggest to/from expression body Quick Assist when selection is in the expression.
Flutter return expressions in build() methods can be quite long,
and it is surprising to see this Quick Assist, and not clear to
what it will be applied. Especially when the method is so long that you
don't even see its beginning.

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

Bug:
Change-Id: Ib245c34f3cbc51add23810c025ebda9d8471ee9b
Reviewed-on: https://dart-review.googlesource.com/17621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-31 18:51:37 +00:00
Konstantin Shcheglov 68a89d10ef Fix for EOL when adding missing overrides for not empty classes.
R=brianwilkerson@google.com

Bug:
Change-Id: I95a801fed5925959fd9db58c96ecb60fbf7e6899
Reviewed-on: https://dart-review.googlesource.com/17540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-31 17:46:35 +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 577bb2dc7e Extract shorten() into string utils.
R=brianwilkerson@google.com

Bug:
Change-Id: I68d17461b4b5b478df5713cadb120a130f492406
Reviewed-on: https://dart-review.googlesource.com/16602
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-25 18:54:34 +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
Konstantin Shcheglov 82d90f6773 Add tests for isFlutterWidget() and isFlutterWidgetCreation().
R=brianwilkerson@google.com, devoncarew@google.com

Bug:
Change-Id: I7946941e458e1ba538921b0e8552dbe555fb0aab
Reviewed-on: https://dart-review.googlesource.com/16303
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-24 21:26:48 +00:00
Devon Carew e6a34d78f1 Improve the extract method refactoring for flutter build() methods.
Bug:
Change-Id: Ic957eede0989b9cd171212425d5da0aad83bc941
Reviewed-on: https://dart-review.googlesource.com/11740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-08 01:41:41 +00:00
Konstantin Shcheglov fcecf07f92 Make names suggestions for index operator to use only 's' suffix.
R=brianwilkerson@google.com

Bug:
Change-Id: I69d60eb23a1100e8776199dfb3082314062e231a
Reviewed-on: https://dart-review.googlesource.com/12220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-07 01:40:16 +00:00
Brian Wilkerson 31cf7dda06 Do not create parameters for non-final fields
Change-Id: Id7d213d3408739301217c1638d050d0b3946fc76
Reviewed-on: https://dart-review.googlesource.com/12100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-06 18:39:11 +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
Konstantin Shcheglov d4dec4e1a4 Create GenericTypeAliasElement for both FunctionTypeAlias and GenericTypeAlias nodes.
Some pain points are:

1. It is a breaking change. I think I will break it even more by removing
   FunctionTypeAliasElement altogether.

2. We lose ability to keep track that this FunctionType is instantiation
   of a typedef. Just like in Kernel.

3. We sometimes have to look up to see if the GenericFunctionTypeElement
   is a function in a named GenericTypeAliasElement.

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

Bug:
Change-Id: Ib250cc446a0ed5b8969f16f7cc6293ef4acf01a8
Reviewed-on: https://dart-review.googlesource.com/9421
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-29 00:39:05 +00:00
Brian Wilkerson c0bf4ab395 Handle recursive import/export graph in completions
Change-Id: Ia164c13f3119f569d781292353acc17243c8a464
Reviewed-on: https://dart-review.googlesource.com/7000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-19 18:01:04 +00:00
Devon Carew 2b3b0272c4 Switch to using specific throws calls instead of general throwsA() calls.
Bug:
Change-Id: Id604dca1b8c3060c1d12c9ed0b1493771d2eb0d6
Reviewed-on: https://dart-review.googlesource.com/5883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2017-09-14 18:04:44 +00:00
Devon Carew b12d010064 Remove the use of deprecated package:test API.
Bug:
Change-Id: I671678117f72efac5efd60d7b4e459dffcce47c6
Reviewed-on: https://dart-review.googlesource.com/5542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-13 21:55:00 +00:00
Konstantin Shcheglov f7eba2359b Create new style GenericFunctionTypeElementImpl for function typed parameters.
ParameterElement.parameters/typeParameters always return empty lists.

This was initially landed as https://dart-review.googlesource.com/c/sdk/+/3401,
but was rolled back because of dartdoc breakage.

R=brianwilkerson@google.com

Bug:
Change-Id: I328355fa4520536dfd0029966ad9f9af2e63a7d2
Reviewed-on: https://dart-review.googlesource.com/5000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-11 19:15:11 +00:00
Konstantin Shcheglov 1b4239d2e4 Export ByteStore and its implementations from front_end.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-09-07 19:23:21 +00:00
Lasse Reichstein Holst Nielsen 76a3b431bb Revert "Create new style GenericFunctionTypeElementImpl for function typed parameters."
This CL broke the SDK API-doc generation.
See https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fclient.dart%2Fdart-sdk-linux-be%2F15242%2F%2B%2Frecipes%2Fsteps%2Fgenerate_API_docs%2F0%2Fstdout

Change-Id: I2b4acd766fb65e82a29b73412833e04112ba9dc4
Reviewed-on: https://dart-review.googlesource.com/3460
Reviewed-by: Jonas Termansen <sortie@google.com>
2017-09-06 10:43:11 +00:00
Konstantin Shcheglov a3f8740bbd Create new style GenericFunctionTypeElementImpl for function typed parameters.
ParameterElement.parameters/typeParameters always return empty lists.

R=brianwilkerson@google.com

Bug:
Change-Id: I5200df9e891031437d6e597f30fa54399b7d00e1
Reviewed-on: https://dart-review.googlesource.com/3401
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-06 02:31:11 +00:00
Brian Wilkerson 28381b8f06 Add completion of keywords in partial field declarations
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/3006033002 .
2017-09-03 13:04:06 -07:00
Brian Wilkerson 0db33f7053 Add fixes for more lints
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3009063002 .
2017-09-02 15:11:29 -07:00
Brian Wilkerson aab7af12e9 Add fixes for two more lint rules
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004293002 .
2017-09-02 15:10:56 -07:00
Brian Wilkerson 170c562ffe Add fixes for two additional lints
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3007783002 .
2017-08-29 10:18:17 -07: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
danrubel 84a36f1b77 flag to limit file and package URI completion suggestions
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/3003233002 .
2017-08-23 13:39:32 -04:00
Brian Wilkerson e4d44b2dcd Remove more references to the old plugin system
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004523003 .
2017-08-23 09:25:07 -07:00
Brian Wilkerson b999edf5ee Remove more references to AnalysisContext
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3003173002 .
2017-08-23 07:53:14 -07:00
Brian Wilkerson b941f148a7 Remove uses of the old plugin model from the analysis server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3001413002 .
2017-08-23 07:42:13 -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 31887d6e42 Add a test that requires adding an import
Review-Url: https://codereview.chromium.org/2998903002 .
2017-08-13 08:33:50 -07:00
Brian Wilkerson beae4b29f1 Handle creation of class members in files other than the file containing the error
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2998703002 .
2017-08-09 08:57:29 -07:00
Paul Berry 89c910b9c1 Move byte_store.dart and file_byte_store.dart to their own subdirectory.
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.

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

Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Brian Wilkerson 5b88eef0af Suggest covariant in parameter lists
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2986133002 .
2017-07-28 10:33:07 -07:00
Brian Wilkerson 950b4108f7 Add assist to convert part-of directives
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2986903002 .
2017-07-26 09:08:37 -07:00
Konstantin Shcheglov bdd69ccd6c Remove UriReferencedElement with its uri/uriOffset/uriEnd properties.
The 'Move File' refactoring does not work, so I comment out most
of its code.

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

Review-Url: https://codereview.chromium.org/2982993003 .
2017-07-19 09:31:03 -07:00
Konstantin Shcheglov 90121b528a Remove the 'Move File' refactoring.
It has been broken since we switched to Analysis Driver.
Given that IDEA does not use it, there is little incentive to fix it.

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

Review-Url: https://codereview.chromium.org/2983783003 .
2017-07-18 17:59:20 -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
Konstantin Shcheglov a673395664 Don't depend on visiting local functions.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2970403002 .
2017-07-07 13:01:23 -07:00
Brian Wilkerson e454986288 Add code to run more tests from test_all
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2968233002 .
2017-07-06 12:24:01 -07:00
Konstantin Shcheglov ce43a15e51 Stop depending of visiting LocalVariableElement(s) in Executableelement.visitChildren().
We still visit them, but analyzer and analysis_server don't need it.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2969343002 .
2017-07-05 12:28:20 -07:00
Brian Wilkerson 3c1c22a3a1 Add a quick fix for missing new (issue 30077)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2965063002 .
2017-07-05 10:59:34 -07:00
Brian Wilkerson 62f43f663b Fix a bug in inline method refactoring
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2973673002 .
2017-07-05 09:35:48 -07:00
Brian Wilkerson 2f28f5713c Fix a test so that it passes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2968883002 .
2017-07-03 08:39:31 -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
Konstantin Shcheglov 238894eb76 Stop using ExecutableElement.localVariables in RenameClassMemberRefactoringImpl.
This is the only / last usage in Analysis Server.
And this change fixes 3 failing tests.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2961363003 .
2017-06-30 11:58:15 -07:00
Konstantin Shcheglov e0f4c7b467 Report only private members in the same library as overrides.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2959273002 .
2017-06-28 13:47:33 -07:00
Konstantin Shcheglov 911263f240 Remove the old index.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963773003 .
2017-06-28 13:44:05 -07:00