Commit Graph

185 Commits

Author SHA1 Message Date
Brian Wilkerson 99ce88f8bc (TBR) Fix more failing tests
Review URL: https://codereview.chromium.org/2426723002 .
2016-10-17 12:57:56 -07:00
Konstantin Shcheglov 831d3119f2 Issue 27536. Quick Fix for 'Avoid using braces in interpolation when not needed'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27536

Review URL: https://codereview.chromium.org/2397153004 .
2016-10-07 12:51:04 -07:00
Konstantin Shcheglov 05a86a7495 Remove 'initializeTestEnvironment' from 'analysis_server'.
Also fixes the server_options_test.dart:22 test broken in https://codereview.chromium.org/2394683006/

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

Review URL: https://codereview.chromium.org/2402483002 .
2016-10-06 10:26:17 -07:00
Konstantin Shcheglov de4d8b3a78 Switch analysis_server to use 'package:test'.
I'm changing DEPS in the corresponding analyzer CL.

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

Review URL: https://codereview.chromium.org/2394683006 .
2016-10-06 08:47:15 -07:00
Konstantin Shcheglov 3647e7bac0 Order suggested Quick Fix imports: direct, export, non-API.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2377803002 .
2016-09-27 15:03:26 -07:00
Konstantin Shcheglov e82cbea8fe Issue 27386. Fix for 'use similar' Quick Fix for import-prefixed identifiers.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27386

Review URL: https://codereview.chromium.org/2361483002 .
2016-09-21 10:02:20 -07:00
Brian Wilkerson ab9ba20c04 Fix recently introduced strong-mode errors
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Konstantin Shcheglov 010578b88a Issue 26335. Insert an empty line if the class body is a single line.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26335

Review URL: https://codereview.chromium.org/2256463002 .
2016-08-16 15:13:22 -07:00
Konstantin Shcheglov 55fcc03572 Use the new StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT error.
...instead of StaticWarningCode.UNDEFINED_IDENTIFIER

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2162523003 .
2016-07-18 10:48:55 -07:00
Konstantin Shcheglov 79f7150d97 Issue 26249. Quick Assist to convert final fields into getters.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26249

Review URL: https://codereview.chromium.org/2140193003 .
2016-07-12 14:15:44 -07:00
Konstantin Shcheglov f1fa32e356 Issue 26249. Quick Assist to convert getters into final fields.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26249

Review URL: https://codereview.chromium.org/2144763002 .
2016-07-12 13:31:53 -07:00
Konstantin Shcheglov bf731dfcd5 Issue 26764. Insert required imports in the correct sorting order.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26764

Review URL: https://codereview.chromium.org/2143023002 .
2016-07-12 11:17:02 -07:00
Konstantin Shcheglov dc42500408 Issue 26821. Don't add 'void' return type for setters when lint 'avoid_return_types_on_setters' is enabled.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26821

Review URL: https://codereview.chromium.org/2123333002 .
2016-07-06 13:00:38 -07:00
Konstantin Shcheglov 67a500e134 Issue 26460. Add Quick Fix for missing 'Function.call()' implementation.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26460

Review URL: https://codereview.chromium.org/1981353002 .
2016-05-17 09:00:53 -07:00
Brian Wilkerson f9b575e5b3 More strong mode changes to analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1855643002 .
2016-04-01 18:00:04 -07:00
Konstantin Shcheglov 559bc17535 Rework computing simple strings difference.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26140

Review URL: https://codereview.chromium.org/1849843002 .
2016-03-31 10:18:06 -07:00
Konstantin Shcheglov 582c038940 Fix for sorting directives with documentation comments.
Stop trying to keep non-documentation directive comments after sorting.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1843763002 .
2016-03-30 17:21:30 -07:00
Konstantin Shcheglov c7531fb499 Issue 26050. Don't suggest to import an already imported (with 'show') library again.
R=pquitslund@google.com, brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26050

Review URL: https://codereview.chromium.org/1816163002 .
2016-03-21 10:21:29 -07:00
Konstantin Shcheglov 0f64fcdd6f Issue 26051. Fix for MethodDeclartion.beginToken for external.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26051

Review URL: https://codereview.chromium.org/1820743002 .
2016-03-20 15:21:03 -07:00
Brian Wilkerson e28c816855 Fix generation of getters and fields in quick fixes (issue 25691)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1804743002 .
2016-03-14 14:03:44 -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
pq f506639391 Back out ignore quick-fix.
As per, https://github.com/dart-lang/sdk/issues/25926, we'll migrate this behavior to the IDE side.

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1770733002 .
2016-03-07 09:25:28 -08:00
pq 1f0a0b5a5c Quick fix to ignore a specific error (#25915).
See: https://github.com/dart-lang/sdk/issues/25915

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1764853002 .
2016-03-04 11:11:06 -08:00
Konstantin Shcheglov adcf43968f Ignore not ClassDeclaration target of an unknown method invocation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1764743002 .
2016-03-03 11:23:32 -08:00
Konstantin Shcheglov 80531d974d Make SearchMatch usable for the new index - remove the element field.
The 'element' is still accessible, but as a computed property.

In many cases we don't need to know the containing element, and need
only the unit source, or the LibraryElement. So, by computing it on
demand we may save some time and make SearchMatch usable with the
new index - where we don't know the Element.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1764553002 .
2016-03-03 08:40:57 -08:00
pq d223676c7f Fix @override quick-fix to respect doc comments.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1751163002 .
2016-03-01 13:01:57 -08:00
Konstantin Shcheglov e225e619cd Issue 25827. Don't propose to remove the type of an incomplete variable declaration.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25827

Review URL: https://codereview.chromium.org/1753893002 .
2016-03-01 12:20:24 -08:00
pq 549a7a4d00 Quick-fix for annotate_overrides lint (#25416).
An interim approach to shoe lint-awareness into the dart FixProcessor.  Once we have a a shareable processor base class we can migrate these bits into a dedicated LintFixProcessor contributed by the LintServerPlugin.

See: https://github.com/dart-lang/sdk/issues/25416

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1736383002 .
2016-02-26 14:23:05 -08:00
Konstantin Shcheglov 44fc8ec8f3 Make add/remove type Quick Assists less obtrusive.
It is nice to have them until after the variable name, but not OK to
have them on initializers, especially when the initializer has a
closure.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1737563002 .
2016-02-25 08:20:23 -08:00
Konstantin Shcheglov 026748533f Add @override when implement missing overrides for fields.
This makes the code generated by DAS closer to the code generated by
the IDEA plugin.

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

Review URL: https://codereview.chromium.org/1705283002 .
2016-02-17 13:30:23 -08:00
Konstantin Shcheglov 960b9c3409 Issue 25650. Generate unique parameter names when create a method or function.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25650

Review URL: https://codereview.chromium.org/1664423002 .
2016-02-04 13:59:27 -08:00
Konstantin Shcheglov fb520065b8 Issue 25686. Add 'var' for untyped unimplemented fields.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25686

Review URL: https://codereview.chromium.org/1668273002 .
2016-02-04 13:32:49 -08:00
Konstantin Shcheglov 4239eadd74 WEB-20151. Include type arguments into type proposals.
R=brianwilkerson@google.com
BUG= https://youtrack.jetbrains.com/issue/WEB-20151

Review URL: https://codereview.chromium.org/1661763002 .
2016-02-02 18:36:11 -08:00
Konstantin Shcheglov 86106d7a6d Issue 25623. When adding the 'async' modifier, change the return type.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25623

Review URL: https://codereview.chromium.org/1652963003 .
2016-02-01 10:35:47 -08:00
Konstantin Shcheglov 3f7a21bc0e Issue 25622. Quick fix for 'async-for'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25622

Review URL: https://codereview.chromium.org/1650853002 .
2016-02-01 08:03:55 -08:00
Konstantin Shcheglov 53b2815ad8 Ignore 'expr is' outside of a statement.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1609883002 .
2016-01-19 13:20:38 -08:00
Konstantin Shcheglov e1c6faceb5 Issue 25316. Quick Fix for removing 'final' keyword.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25316

Review URL: https://codereview.chromium.org/1545323002 .
2015-12-27 13:19:41 -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 f93d4fde97 Issue 25219. Fix for RangeError during converting empty lines in /// comments.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25219

Review URL: https://codereview.chromium.org/1518723002 .
2015-12-10 10:08:07 -08:00
Paul Berry 7d3c4743db Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27 2015-12-03 14:22:24 -08:00
Konstantin Shcheglov 5f49df1644 Issue 25095. Add 'Change X to Y type annotation' Quick Fix.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25095

Review URL: https://codereview.chromium.org/1492053004 .
2015-12-02 18:50:41 -08:00
Brian Wilkerson 600fc17de1 Clean-up the registration of plugins
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -08:00
Konstantin Shcheglov bf54a3bef6 Don't attempt to create a file for non-Dart imports.
This should help to fix the following exception:

Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Exception from fix contributor: DefaultFixContributor
Bad state: No element

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1492843003 .
2015-12-02 09:28:58 -08:00
Konstantin Shcheglov cfc8ee30b7 Fix for exception in FixProcessor._addFix_illegalAsyncReturnType.
This fixes the following reported exception.

Dart analysis server, SDK version 1.13.0, server version 1.12.0, error: Exception from fix contributor: DefaultFixContributor
The null object does not have a getter 'offset'.

NoSuchMethodError: method not found: 'offset'
Receiver: null
Arguments: []

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1487683006 .
2015-12-01 14:37:11 -08:00
Konstantin Shcheglov 6859412fac Issue 24865. Quick Fix 'Create Method' should create named parameters.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24865

Review URL: https://codereview.chromium.org/1475743003 .
2015-11-24 14:55:39 -08:00
Konstantin Shcheglov 67e4b7d081 Convert all 'wrong' test to 'BAD'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1469333003 .
2015-11-24 14:02:01 -08:00
Konstantin Shcheglov c0c11daa15 Disable merging of 'if' statements when there are other staments in the outer one.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1473513003 .
2015-11-24 13:06:20 -08:00
Konstantin Shcheglov 1e05c35650 Issue 25021. Fix for adding new required parameters when optional exist.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25021

Review URL: https://codereview.chromium.org/1468913004 .
2015-11-23 09:21:11 -08:00
Konstantin Shcheglov 53e9cce24d Quick assist for converting block documentation comments into line ones.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1470753002 .
2015-11-22 19:57:03 -08:00