Commit Graph

698 Commits

Author SHA1 Message Date
shiraji 6f94f45409 Disable "Make constructor internal" for annotations #KT-17599 Fixed 2017-04-28 10:55:13 +03:00
shiraji d542aef7e4 Disable "Make constructor private" for annotations #KT-17600 Fixed 2017-04-28 10:54:54 +03:00
Dmitry Neverov 9dd217eee3 Introduce intention to name anonymous parameter #KT-17191 Fixed 2017-04-27 20:58:38 +03:00
Dmitry Neverov f84c5b0339 Do not suggest 'Convert to secondary constructor' for annotation classes
#KT-17408 Fixed
2017-04-26 06:37:30 +02:00
Kirill Rakhman 76507caf4b Add intention to convert concatenation to raw string #KT-17503 Fixed 2017-04-25 16:43:52 +03:00
Alexey Sedunov c305a42128 Convert Receiver to Parameter: Place new parameter at the start
This affects editor template only since Change Signature already
puts converted receiver at the parameter list start by default

 #KT-15543 Fixed
2017-04-21 13:32:31 +03:00
Mikhail Glukhikh 02e9a3d027 Specify lambda signature: handle special parameters correctly
So #KT-17372 Fixed
2017-04-19 13:12:53 +03:00
shiraji 83169ad781 "Add open to callable" intention introduced #KT-16786 Fixed 2017-04-19 11:37:48 +03:00
Alexey Sedunov aa0f0ef02d Presentation: Do not use resolve to compute element description
Invoking analysis on EDT may degrade editor performance
2017-04-17 23:00:08 +03:00
Alexey Sedunov fc33d89e28 Move Member out of Companion: Improve conflict checking
Also do not show conflict dialog under write action
2017-04-17 23:00:06 +03:00
Vyacheslav Gerasimov 6b9242075a Fix MovePropertyToConstructorIntention applicability and type rendering
#KT-17238 Fixed

(cherry picked from commit 7f9d88a)
2017-04-07 14:32:06 +03:00
mglukhikh d9e1e82948 Destructure is available even without usages #KT-14435 Fixed 2017-04-05 15:07:15 +03:00
mglukhikh feb9dd4d83 Don't suggest destructuring if at least half components not used
So #KT-16828 Fixed
2017-04-05 14:45:48 +03:00
mglukhikh f13997750f Make destructure intention work on library data classes
So #KT-16468 Fixed
So #KT-14402 Fixed
2017-04-04 19:22:31 +03:00
mglukhikh 8a02ce3dc2 KT-16828: use _ when appropriate in destructure intention 2017-04-04 19:22:24 +03:00
Mikhail Zarechenskiy 3f1a43a743 Minor, update test data
See 8466270 for the reason.
 Note that actually we do not report errors on such cases because psiElement is not valid, but in tests for intentions we check all errors
2017-03-27 10:36:10 +03:00
Mikhail Glukhikh b121990368 Don't suggest 'remove let' when 'it' is used multiple times
So #KT-16857 Fixed
2017-03-24 16:20:00 +03:00
Mikhail Glukhikh bbdcf19123 Fix "secondary constructor -> primary" in case of implicit super call
So #KT-16903 Fixed
2017-03-24 16:19:18 +03:00
Mikhail Glukhikh 0baae16601 Don't apply "object->lambda" if 'this' is used inside #KT-15250 Fixed 2017-03-24 16:19:04 +03:00
Mikhail Glukhikh ca92ec0b7b Fix "Specify explicit lambda signature" when no parameters exists
So #KT-15075 Fixed
2017-03-24 16:18:56 +03:00
Vyacheslav Gerasimov f60a7ffab0 Add intentions to move property from/to primary constructor
#KT-4578 Fixed
2017-03-24 15:22:50 +03:00
Dmitry Jemerov b24ce04dea Convert IntentionTestGenerated to light fixture test case 2017-03-23 15:48:33 +01:00
Mikhail Glukhikh cab80812ef KT-13111: lambda --> reference supports also object members 2017-03-14 18:45:08 +03:00
Mikhail Glukhikh 631f58f27f Lambda --> reference: correct handling of companion references
Reference receivers are named more accurately now #KT-13341 Fixed
2017-03-14 18:45:06 +03:00
Mikhail Glukhikh 2c692de98f KT-13111: lambda --> reference support methods called via this now 2017-03-14 18:45:05 +03:00
Mikhail Glukhikh 19db4869e6 Lambda --> reference: correct handling of parameter-less function
Issue #KT-15556 Fixed
2017-03-14 18:45:04 +03:00
Mikhail Glukhikh 3a14a5c461 Lambda --> reference supports bound references now #KT-13111 Fixed 2017-03-14 18:45:01 +03:00
Mikhail Glukhikh 831467891c Reference --> lambda supports bound references now #KT-16292 Fixed 2017-03-14 18:45:00 +03:00
shiraji 0e5603f644 Implement an intention converting several calls with same receiver to with/apply/run #KT-12183 Fixed 2017-03-02 16:56:56 +03:00
Kirill Rakhman 8d425a6f94 Add intention to add missing components to destructuring assignment #KT-16258 Fixed 2017-03-01 18:00:55 +03:00
Simon Ogorodnik 2490318f93 KT-16076 Completion inserts FQN kotlin.text.String
KT-14831 Don't add import statement and FQN on converting lambda to reference if typealias is used
KT-16088 Completion wrongly inserts FQN for `kotlin` package
 #KT-16076 fixed
 #KT-14831 fixed
 #KT-16088 fixed
2017-02-13 16:48:14 +03:00
Mikhail Glukhikh 153bc79c08 Join declaration & assignment: do not suggest for non-first line of init / constructor #KT-15545 Fixed 2017-02-03 19:26:49 +03:00
Mikhail Glukhikh ea6e3c828d Join declaration & assignment: treat assignment with this. correctly #KT-16000 Fixed 2017-02-03 19:26:48 +03:00
Dmitry Jemerov ffa3cf0027 Don't show "Convert lambda to reference" for lambdas passed to suspend functions
#KT-16072 Fixed
2017-01-31 13:42:38 +01:00
Mikhail Glukhikh 08caf0a011 Object literal to lambda: handle last comment correctly #KT-15670 Fixed 2017-01-27 18:15:56 +03:00
Mikhail Glukhikh c0f5cafbd8 Set type reference: destructuring support #KT-14994 Fixed 2017-01-27 18:15:54 +03:00
Mikhail Glukhikh f4513e9c70 Remove explicit lambda parameter types: destructuring support #KT-15162 Fixed
Also #KT-14993 Fixed
2017-01-27 18:15:52 +03:00
Kirill Rakhman 956094e062 Add Merge ifs intention (#975)
Fixes #KT-9912
2017-01-27 14:20:11 +01:00
Simon Ogorodnik cd73d17bd4 KT-15311 "Add Import" intention generates incorrect code
#KT-15311 fixed
2017-01-26 13:24:41 +03:00
mglukhikh 96cddb6b7b False positive in "Remove redundant let" fixed #KT-15884 Fixed 2017-01-24 15:17:48 +03:00
mglukhikh be75ef919e Change visibility modifier: now works on no-modifier type aliases #KT-15066 Fixed 2017-01-24 15:17:41 +03:00
shiraji ad9bf1626f Fix the problem with ConvertPrimaryConstructorToSecondaryIntention for enum #KT-15406 Fixed 2017-01-19 17:57:33 +03:00
mglukhikh 93b2c56bb4 Fixed KNPE in convert primary constructor to secondary #KT-14745 Fixed 2017-01-16 17:35:51 +03:00
Nikolay Krasko ea7fac07c4 Ban import member intentions from import directives (KT-13710)
#KT-13710 Fixed
2017-01-16 13:00:50 +03:00
Simon Ogorodnik 0cf02dcb7b KT-15092 Suppress inspection "use property access syntax" for some getters and fix completion for them
#KT-15092 fixed
2017-01-12 14:53:38 +03:00
Mikhail Glukhikh 7c6d5c825c Join declaration & assignment is no more suggested in case of potential smart cast available #KT-15412 Fixed 2017-01-11 19:10:09 +03:00
Alexey Sedunov 534a773816 Intentions: Implement intention which converts object literal to class
#KT-15056 Fixed
2017-01-10 21:16:12 +03:00
Kirill Rakhman 2b54f1ac72 "Add names to call arguments" shouldn't appear when the only argument is a trailing lambda
Fixes #KT-15501
2017-01-09 16:34:13 +03:00
Mikhail Glukhikh 67788e39d3 Fold initializer & if to elvis: search for variable usage inside if first #KT-14889 Fixed 2016-12-22 14:56:38 +03:00
Mikhail Glukhikh ee1b741e84 More accurate handling of Elvis in areParenthesesNecessary #KT-15227 Fixed 2016-12-22 14:56:32 +03:00