scheglov@google.com
0b922f3d22
Quick Fix for an undefined class in is/as expressions.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//913923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43675 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 01:31:53 +00:00
scheglov@google.com
07d2c82919
Issue 22316. Don't propose to create invalid local variable.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22316
Review URL: https://codereview.chromium.org//895773004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43600 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 16:45:43 +00:00
scheglov@google.com
8cee600323
Don't propose fixes to update SDK sources.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//902273002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43574 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 22:21:48 +00:00
scheglov@google.com
2593c00b36
Quick Fix for adding 'async' to fix invalid 'await'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//894373005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43571 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 21:10:11 +00:00
scheglov@google.com
bd8778a87b
Quick Assist to add explicit types to formal parameters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//908503004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43566 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 20:03:39 +00:00
scheglov@google.com
a9bc5e512d
Issue 22150. Quick fix to add a getter, in addition to create a field.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22150
Review URL: https://codereview.chromium.org//875193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43155 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 22:29:37 +00:00
scheglov@google.com
a38a503d86
Replace @ReflectiveTestCase() with @reflectiveTest.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//849863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42821 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:11:24 +00:00
scheglov@google.com
05ac43c3ea
Issue 22027. When parameters has function type alias type, use its name.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22027
Review URL: https://codereview.chromium.org//836413006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42720 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 22:10:36 +00:00
scheglov@google.com
712cd7cc87
Check if assists are requested on a invalid offset.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//823103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42609 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 19:58:20 +00:00
scheglov@google.com
fef0e84293
Issue 21883. Add checks if type parameters can be used.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21883
Review URL: https://codereview.chromium.org//806933002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42377 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 00:29:22 +00:00
scheglov@google.com
a662ca1ea1
Disable 'Split && condition' if there is an 'else' statement.
...
R=danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//805053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42374 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 20:36:13 +00:00
scheglov@google.com
956e9e41ed
Fix for exchaning comparison operators arguments.
...
R=danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//800593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42299 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 21:07:14 +00:00
scheglov@google.com
2996ef1754
Issue 21650. Fix linked positions added after insert code buffers.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21650
Review URL: https://codereview.chromium.org//750423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41928 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 15:52:58 +00:00
scheglov@google.com
a255faf85c
Exchanging operands of a comparision operator should invert the operator.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//756483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41927 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 15:51:47 +00:00
scheglov@google.com
52d55e933d
Issue 21662. Fix 'Sort Members' when both directives and declarations are updated.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21662
Review URL: https://codereview.chromium.org//753883003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41926 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 15:50:19 +00:00
scheglov@google.com
703b744966
Issue 21655. Don't import self when add type declaration.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21655
Review URL: https://codereview.chromium.org//747613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41869 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 22:10:57 +00:00
scheglov@google.com
91c02b4a8e
Issue 21618. Fix for empty code for 'dynamic' type.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21618
Review URL: https://codereview.chromium.org//731313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41838 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 17:42:29 +00:00
scheglov@google.com
b8da9bc651
Format and sort analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//725143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
scheglov@google.com
9e4a3ec845
Report HintCode.UNUSED_FIELD
...
There are two positives in dart2js, valid as I can see.
There are several positives in analyzer and analysis_server.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//728503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41727 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 23:12:40 +00:00
scheglov@google.com
7e71785a58
Issue 20827. Add imports as needed the 'Add type annotation' Quick Assist.
...
I left some TODOs, the CL is big enough already.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20827
Review URL: https://codereview.chromium.org//706263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41620 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 23:21:35 +00:00
scheglov@google.com
772a0c6b22
Fix 'Unused local variable' hints in analyzer and analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//709493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41576 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 18:32:54 +00:00
scheglov@google.com
ca91f9f770
Report HintCode.UNUSED_LOCAL_VARIABLE for local variables whose value is never used.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//686113007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41568 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 17:00:28 +00:00
scheglov@google.com
8bd5c75f0c
Fix for 'Replace if-else with conditional expression' in case of mixed expression/return branches.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//690353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41446 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:22:22 +00:00
scheglov@google.com
b7c685bbe2
Support for 'Add Type Annotation' when selection if right after ';'.
...
R=brianwilkerson@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//693193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41445 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:09:03 +00:00
scheglov@google.com
97bc20ffc5
Suggest names for PropertyAccess.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//646103006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41409 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 22:07:27 +00:00
scheglov@google.com
bdd50e1230
Issue 21458. Support for 'Add type' Quick Assist in for-each loops.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21458
Review URL: https://codereview.chromium.org//680133003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41403 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 20:59:29 +00:00
scheglov@google.com
2d38012c14
'Create Local Varaible' quick fix.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//677583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41280 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 14:55:38 +00:00
scheglov@google.com
3074fefa82
Issue 21372. "Convert into block body" and "Convert into expression body" for factory constructors.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21372
Review URL: https://codereview.chromium.org//664403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41230 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 15:32:55 +00:00
scheglov@google.com
8f4ce65d53
Ignore case when sort members.
...
R=brianwilkerson@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//646753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41033 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 23:48:19 +00:00
scheglov@google.com
9bcd836cf8
Search for function to import even when reported as UNDEFINED_METHOD.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//636293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40996 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 19:35:45 +00:00
scheglov@google.com
e9e0694e2f
Remove references to Engine classes from protocol.dart
...
R=brianwilkerson@google.com , paulberry@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//628293004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40948 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 00:24:48 +00:00
scheglov@google.com
11644f7288
Fix for the prefix/suffix diff computing.
...
We need to exclude a common part of a prefix/suffix.
Also, I decided not to improve diff calculation, at least in the short term.
So, I'm removing diff.dart and the TODO comment.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//626883003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40903 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 17:31:55 +00:00
scheglov@google.com
a863eecbfd
Use simple prefix/suffix diff in members sorter.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//615313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40880 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 14:52:14 +00:00
scheglov@google.com
099ce93ec3
Add 'Introduce new local with cast type' quick assist.
...
Unfortunately we still often need it in Dart, as we always need it in Java.
Type promotion does not work for "if (name is Type)" if "name" is a field,
an expression or "name" is modified _anywhere_ in the function.
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//618833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40824 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 20:45:10 +00:00
scheglov@google.com
85b466c9c6
Issue 19670. Extend the 'Create Field' Quick Fix to support getter context.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19670
Review URL: https://codereview.chromium.org//610323005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40812 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 15:18:37 +00:00
scheglov@google.com
29b292ee4c
Issue 19670. 'Create field' quick fix.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19670
Review URL: https://codereview.chromium.org//608363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40782 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 19:45:34 +00:00
scheglov@google.com
133a7cc20c
'Sort unit/class members' refactoring implementation.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//609653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40718 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 17:10:25 +00:00
scheglov@google.com
df85f37a29
Issue 13783. Add file from missing import.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=13783
Review URL: https://codereview.chromium.org//586453003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40482 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 00:19:54 +00:00
scheglov@google.com
457050dd88
Add SourceFileEdit.time field.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//574573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40329 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 17:19:37 +00:00
scheglov@google.com
7eae998b90
Issue 13029. Quick fix to create a function for a Function typed named parameter.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=13029
Review URL: https://codereview.chromium.org//565023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40242 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 14:53:06 +00:00
scheglov@google.com
3f1f6f9e41
Issue 20892. Quick Fix 'Import Library' for type arguments.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20892
Review URL: https://codereview.chromium.org//556793007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40241 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 14:50:38 +00:00
scheglov@google.com
4a59e13a84
Issue 19799. Merge getter/setter pairs into fields when create missing overrides.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19799
Review URL: https://codereview.chromium.org//563333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40220 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 21:29:09 +00:00
scheglov@google.com
8269bc67c3
Issue 19801. Fix for inlining referenced function with an expression body.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19801
Review URL: https://codereview.chromium.org//569723004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40214 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 19:41:59 +00:00
scheglov@google.com
3120d3632f
Issue 17024. Quick Fix to find imported library.
...
It works with both project and package libraries.
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=17024
Review URL: https://codereview.chromium.org//562333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40173 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:36:04 +00:00
scheglov@google.com
14e375418b
Issue 10355. Quick Fix to replace 'var' with 'dynamic'.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=10355
Review URL: https://codereview.chromium.org//562183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40172 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:26:58 +00:00
scheglov@google.com
88c1df9734
Issue 20891. Produce Quick Fixes for annotations.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20891
Review URL: https://codereview.chromium.org//562293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40167 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 17:36:42 +00:00
scheglov@google.com
7ac6ed2b6f
Issue 20890. Fix for NPE in the 'Add show' QA.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20890
Review URL: https://codereview.chromium.org//560913003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40115 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 20:49:42 +00:00
paulberry@google.com
ea7f519f03
Make SdkLibrary.shortName consistently include 'dart:'
...
The documentation of SdkLibrary.shortName claimed that it didn't
include the 'dart:' prefix; however the implementation did include it.
The implementation of shortName in _MockSdkLibrary class (used only
for unit testing) did not include the 'dart:' prefix, causing some
unit tests to pass even though the functionality was wrong.
This change updates the docs and _MockSdkLibrary to correspond to the
implementation (the 'dart:' prefix is included). Additionally it
fixes one usage of shortName which was expecting the 'dart:' prefix to
be absent; this was preventing quick fixes from working correctly.
In addition, the Mock SDK is modified to add a reference from
dart:core to dart:async and from dart:async to dart:math (these
dependencies exist in the real SDK). This avoids the need for some
workarounds in unit tests.
BUG=dartbug.com/20850
R=scheglov@google.com
Review URL: https://codereview.chromium.org//556573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40000 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 21:02:30 +00:00
scheglov@google.com
897ba068ee
Fix for no-op assist proposals.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//548523004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39931 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 21:09:01 +00:00
paulberry@google.com
8d8ee25cff
Merge analysis_testing package into analysis_server.
...
Note that analysis_server already contains a file test/mocks.dart, so
the mocks.dart file from analysis_testing has been imported as
test/mocks2.dart. I will merge these two into a single file in a
future CL.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//533243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39814 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 18:11:42 +00:00