Commit Graph

1098 Commits

Author SHA1 Message Date
Mikhail Glukhikh 24622c0139 Fix two broken tests (missing actions) 2018-02-28 10:31:27 +03:00
Dmitry Savvinov d570b863ce Introduce deprecation of companion objects nested classes
Introdude deprecation as per KT-21515. Warning is reported on type
usage, that soon will became invisible. Quickfix by adding explicit
import is added.

Idea behind implementation is to mark scopes that are deprecated (see
ClassResolutionScopesSupport).

Then, during walk along hierarchy of scopes, look at deprecation status
of the scope that has provided this classifier.
Note that we also have to check if there are *some* non-deprecated
visibility paths (because we can see classifier by two paths, e.g. if
we've added explicit import) -- then this type reference shouldn't be
treated as deprecated.
2018-02-21 16:04:49 +03:00
Alexey Sedunov acf6408474 Create from Usage: Fix "Create class" applicability check for when entries
#KT-22329 Fixed
2018-02-21 13:21:17 +03:00
Toshiaki Kameyama a36e8c86f1 KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)
* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
2018-02-17 14:09:44 +03:00
Toshiaki Kameyama 5499078fcc Make "Specify explicit lambda signature" available on whole lambda
So #KT-22492 Fixed
2018-02-13 12:28:50 +03:00
Dmitry Jemerov 5bb195df9b No space between label and lambda in labeled expressions
#KT-22301 Fixed
2018-02-09 10:49:01 +01:00
Alexey Sedunov 049439ce1d Rename: Update test data (follow-up for unnecessary reformatting fix) 2018-02-06 14:23:20 +03:00
Mikhail Glukhikh 00ceac54fc Fix "create enum constant" test (create type alias is no longer here) 2018-01-31 13:56:07 +03:00
Toshiaki Kameyama 677b05cc8c KT-22167 "Add annotation target" quick fix does nothing and disappears from menu 2018-01-30 20:25:08 +03:00
Mikhail Glukhikh ee3f89df87 Remove unused function parameter: delete empty constructor accurately
So #KT-22221 Fixed
Fixes also some quick-fix tests
2018-01-19 16:16:15 +03:00
Toshiaki Kameyama 2a10d8e837 KT-15176 Remove "Create type alias" intention when called on java class 2018-01-18 16:23:40 +03:00
Nikolay Krasko 704ce121bc Use other property name in Java with Kotlin static import tests 2018-01-17 12:05:06 +03:00
Kirill Rakhman 8bc020f31b Fix modifier order in generated overriden functions
Fixes #KT-21600
2018-01-16 15:42:02 +01:00
Alexey Sedunov 908bf71ae6 Quick Fixes: Support cross-language "Create from Usage" with Kotlin target 2018-01-16 17:06:53 +03:00
Nikolay Krasko cbfd7088bf Fix inAnnotation test in 173 branch 2018-01-12 13:54:17 +03:00
Nikolay Krasko 23bd0b3db5 Update test data because of changed action name in 173 2018-01-12 13:54:06 +03:00
Toshiaki Kameyama 16695c1af5 KT-21929 Inappropriate quick fix for a sealed class instantiation (#1444) 2018-01-03 11:20:58 +01:00
Toshiaki Kameyama 184651d366 Do not suggest "add inner" quick fix for interfaces etc. #KT-18396 Fixed 2017-12-29 16:43:47 +03:00
Toshiaki Kameyama 5e765c525e Do not suggest quickfix 'Specify type explicitly' with existing type
So #KT-15180 Fixed
2017-12-28 21:06:48 +03:00
Mikhail Glukhikh 2e71691ab2 Fix potential leak in "unused lambda expression body" fix 2017-12-28 20:31:45 +03:00
Dmitry Jemerov 43ef113b7a Correctly apply annotation wrap before modifier keyword
#KT-20314 Fixed
2017-12-22 10:35:22 +01:00
Alexey Sedunov 4ac870500f Minor: Fix test data 2017-12-21 16:01:29 +03:00
Toshiaki Kameyama 411feab9ae KT-21698 Create interface shouldn't suggest to declare it inside a class which implements it 2017-12-20 18:14:55 +01:00
Mikhail Glukhikh 7358980cbc Add inspection to detect non-const vals used as Java annotation args
So #KT-20615 Fixed
2017-12-15 13:31:41 +03:00
Mikhail Glukhikh a375500a33 Spelling: MemberVisibilityCanPrivate > MemberVisibilityCanBePrivate 2017-12-12 19:47:46 +03:00
Toshiaki Kameyama 4563cf250d "Add type" quick fix incorrectly processes vararg modifier with primitive type array initializer #KT-21544 Fixed 2017-12-08 15:46:45 +01:00
Mikhail Glukhikh 834c3fe62b Do not inline property setter if it's not required (e.g. ReplaceWith)
So #KT-21237 Fixed
2017-12-07 12:14:29 +03:00
Mikhail Glukhikh bddaab9d48 Inline properties without setter / with default setter correctly
Related to KT-21237
2017-12-07 12:14:29 +03:00
Nikolay Krasko ab28bdf32f Store in test data failure for quotedName name 2017-12-05 16:07:55 +03:00
Alexey Sedunov 84c6f9bf45 Create from Usage: Fix choosing superclass for abstract member
This applies to cases when non-existing member is called without
explicit receiver

 #KT-21332 Fixed
2017-11-30 12:49:25 +03:00
Alexey Sedunov 7e3ca4734d Create from Usage: Add val to data class parameter
Also place new parameters on the new line if previous ones have line breaks

 #KT-21162 Fixed
2017-11-30 12:49:25 +03:00
Alexey Sedunov 354a6cbfd9 Change Signature: Keep parameter 'val'/'var' when invoked from Java
#KT-20901 Fixed
 #KT-21159 Fixed
2017-11-30 12:49:24 +03:00
Toshiaki Kameyama 2dd66225f3 Take into account vararg modifier in "Add type" quick fix
So #KT-20894 Fixed
2017-11-27 16:44:42 +03:00
Toshiaki Kameyama b8c5d1b852 Fix "add <*>" quick-fix for inner class with generic outer one
So #KT-20763 Fixed
2017-11-10 15:34:17 +03:00
Toshiaki Kameyama 9ea9ea1008 Add quick fix to add required target to annotation #KT-20484 Fixed 2017-11-02 11:07:53 +03:00
Simon Ogorodnik f21e1c60e0 KT-20883: Add more details to MissingDocumentationInspection message
#KT-20883 fixed
2017-10-25 17:54:43 +03:00
Simon Ogorodnik d28e9fd22d KT-20880: Fix AddDocumentationFix to add multiline comment
#KT-20880 fixed
2017-10-25 17:54:42 +03:00
Alexey Sedunov e65adeb029 Misc: Fix quickfix test data 2017-10-18 18:17:50 +03:00
Mikhail Zarechenskiy 88595e1a58 Don't require to override abstract methods in expect class
#KT-16099 Fixed
2017-10-11 15:27:50 +03:00
Mikhail Glukhikh 0b5b5d8e89 Suggest primitive array type for collection literals in "add type" fix
So #KT-18549 Fixed
2017-10-10 22:48:30 +03:00
Toshiaki Kameyama c5b7d0f0df Remove parentheses after deleting the last unused constructor parameter
So #KT-16636 Fixed
2017-10-10 11:55:27 +03:00
Mikhail Glukhikh e47feaf0b8 Add test for KT-20007 2017-10-05 15:28:21 +03:00
Toshiaki Kameyama e92af08c98 Introduce "Assign to property" quick-fix #KT-17204 Fixed 2017-10-05 14:25:28 +03:00
Alexey Sedunov aabe23d410 Minor: Fix coroutine package name in quick fix tests 2017-10-02 18:14:04 +03:00
Toshiaki Kameyama 2121322665 Fix useless "Remove curly braces" before Chinese character
So #KT-20409 Fixed
2017-10-02 17:46:07 +03:00
Mikhail Zarechenskiy 8a545f05de Provide quick fix for migration of single elements in named arguments
See more in KT-20171
2017-09-26 14:49:43 +03:00
Mikhail Zarechenskiy 8ab7c26cae Provide quick fix for named arguments to varargs in annotations
See more in KT-20171
2017-09-26 14:49:43 +03:00
Toshiaki Kameyama 8b135c12e7 Delete useless assert() after simplify comparison #KT-14695 Fixed 2017-09-25 15:35:11 +03:00
Toshiaki Kameyama 1043284afe Add data modifier to a class quickfix #KT-18220 Fixed 2017-09-25 14:17:35 +03:00
Kirill Rakhman 93252926ba Introduce additional quick-fix for (collection) type mismatch
This fixed inserts conversion .toSequence/Array/Iterable/Collection/List
So #KT-19735 Fixed
2017-09-25 12:10:28 +03:00