Commit Graph

833 Commits

Author SHA1 Message Date
Mikhail Glukhikh bec28c8388 Replace with for-each: add new-lines using comment saver
Related to KT-15858
2018-02-28 11:29:44 +03:00
Toshiaki Kameyama 7f880bf58c Replace with for-each: add new-line if necessary #KT-15858 Fixed 2018-02-28 11:18:21 +03:00
Toshiaki Kameyama 4726b44371 Add braces to 'if' statement: save/restore comments correctly
So #KT-16332 Fixed
2018-02-27 18:25:22 +03:00
Mikhail Glukhikh 86e6f3c5e3 Make add / remove labeled return working for hierarchical blocks
Related to KT-20439
2018-02-27 14:47:10 +03:00
shiraji 59f6dc07cf Implement intention to add labeled return to last expression in a lambda
So #KT-20439 Fixed
2018-02-27 14:47:04 +03:00
shiraji 769e28519e Implement intention to remove labeled return from last lambda expression
So #KT-20439 Fixed
2018-02-27 14:46:50 +03:00
Simon Ogorodnik 57e47d1830 Propose convert to string template as inspection more frequent 2018-02-26 12:11:18 +03:00
Toshiaki Kameyama e35ec8ee08 Introduce intention 'expr.unsafeCast<Type>()' <- -> 'expr as Type'
So #KT-16382 Fixed
2018-02-13 13:05:52 +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
Toshiaki Kameyama f9555f3f64 Join with assignment: remove comment from target range #KT-22110 Fixed 2018-02-13 11:45:31 +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
Toshiaki Kameyama 28123eaf7b Add intention for changing setter accessibility #KT-22409 Fixed 2018-01-29 19:09:19 +03:00
Toshiaki Kameyama 3a81be6cfb Do not insert returns before Nothing in "Replace return with 'if'"
So #KT-22159 Fixed
2018-01-29 17:56:26 +03:00
kenji tomita a28bc830f5 Add Intention for single character substring #KT-22171 Fixed 2018-01-29 16:23:01 +03:00
Mikhail Glukhikh 8cbf364457 Remove braces: add parentheses to if-else in more general case
Related to KT-18308
2018-01-29 14:32:36 +03:00
Toshiaki Kameyama 44c15d8311 Remove braces: add parentheses to if-else inside expression
So #KT-18308 Fixed
2018-01-29 14:32:36 +03:00
Alexey Sedunov c96eb8df85 Minor: Fix test data for ConvertFunctionTypeParameterToReceiverIntention 2018-01-24 17:28:34 +03:00
Toshiaki Kameyama 6b2c22aff1 Add intention to specify all types explicitly in destructuring assignment
#KT-16260 Fixed
2018-01-03 17:23:31 +01:00
Toshiaki Kameyama 817dadc120 Specify type: do not suggest nullable type if not null is overridden
So #KT-12814 Fixed
2017-12-29 17:28:44 +03:00
Mikhail Glukhikh 5475f99cec Elvis -> if-then: handle case with safe cast separately #KT-17816 Fixed 2017-12-28 20:31:55 +03:00
Mikhail Glukhikh ec60c92fe9 Lambda -> reference: build bound reference for complex qualified
So #KT-19073 Fixed
2017-12-28 20:31:53 +03:00
Toshiaki Kameyama 52df70a576 Do not suggest replacing comparison to null with function call
So #KT-20620 Fixed
2017-12-28 20:31:38 +03:00
Mikhail Glukhikh 3f00592443 Do not suggest "convert ref to lambda" for reflect types #KT-19283 Fixed 2017-12-28 20:31:27 +03:00
Mikhail Glukhikh 9e919829c8 Refactoring: "simplify assert not null" is now an inspection 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh bc361363d5 Refactoring: "simplify negated binary expression" is now an inspection 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh 35d85ddd1f Refactoring: "replace with operator assignment" is now an inspection 2017-12-26 18:39:49 +03:00
Mikhail Glukhikh ada7287c66 Refactoring: make "replace call with binary operator" an inspection 2017-12-26 18:39:48 +03:00
Mikhail Glukhikh 6d4b5bc48f Refactoring: "introduce when subject" is now an inspection 2017-12-26 18:39:48 +03:00
Mikhail Glukhikh a8b01a6b00 Refactoring: make "if-then to safe access" an inspection 2017-12-26 18:39:47 +03:00
Mikhail Glukhikh 91bcfb97c6 Refactoring: make "replace get or set" an inspection 2017-12-26 18:39:47 +03:00
Mikhail Glukhikh 756cb32eaf Refactoring: make "replace array equality ..." an inspection 2017-12-26 18:39:47 +03:00
Dmitry Jemerov 3178dee759 Insert line break before elvis when converting if to elvis
This ensures correct indentation
2017-12-22 10:35:23 +01:00
Dmitry Jemerov 43ef113b7a Correctly apply annotation wrap before modifier keyword
#KT-20314 Fixed
2017-12-22 10:35:22 +01:00
Dmitry Jemerov 79a509df7b Option to apply normal indent to children of 'if' expressions 2017-12-22 10:35:21 +01:00
Dmitry Jemerov 64f01e53af Check that add() method is in fact MutableCollection.add()
#KT-18881 Fixed
2017-12-18 18:10:33 +01:00
Dmitry Jemerov 94b8614fb8 Don't suggest mapTo() transformation over range literals
#KT-18816 Fixed
2017-12-18 18:10:32 +01:00
Dmitry Jemerov 09d27ca61c Don't generate .forEach { return } when converting loop to call chain
#KT-17161 Fixed
2017-12-18 18:10:31 +01:00
Dmitry Jemerov b775b901cc Fix incorrect replacement with 'any' instead of 'all'
#KT-17730 Fixed
2017-12-18 18:10:24 +01:00
Toshiaki Kameyama 0071ca64c7 Convert lambda to reference produces: fix case with qualified this
So #KT-19977 Fixed
2017-12-15 13:36:32 +03:00
shiraji 5d44037a2b Support 'it op something' case in "redundant let" #KT-21373 Fixed 2017-12-05 19:23:44 +03:00
Mikhail Glukhikh 52053695fe Fix variable name validator (take parameters into account) 2017-12-05 15:29:44 +03:00
Toshiaki Kameyama e341ec969f "Join declaration and assignment" should remove 'lateinit' for 'var' #KT-21603 Fixed 2017-12-05 11:19:58 +09:00
Toshiaki Kameyama 0eec3ef1f8 Add / preserve semicolon after empty companion object #KT-21179 Fixed 2017-12-04 15:15:49 +03:00
Toshiaki Kameyama 7448042b68 Fix callable code factory (parameter with default value case)
Before we can have end of '<Type>' and '=' joined as '>=' breaking PSI
So #KT-15941 Fixed
2017-11-28 14:11:04 +03:00
Mikhail Glukhikh 7b2a66c006 Convert 'simplify when' from intention to inspection
Related to KT-20492
2017-11-10 15:34:11 +03:00
Toshiaki Kameyama df86ff7115 Introduce "Simplify when" intention where one branch is always true
So #KT-20492 Fixed
2017-11-10 15:34:08 +03:00
Alexey Sedunov ba0b21d1a3 Add @JvmStatic Intention: Support functions/properties in objects
Also eliminate unnecessary object instance references on Java call sites

 #KT-20095 Fixed
2017-11-07 19:25:03 +03:00
Toshiaki Kameyama 5f4233e4bf Don't suggest "Remove explicit type specification" for an annotated type
So #KT-20622 Fixed
2017-10-31 14:37:36 +03:00
Mikhail Glukhikh d0e8f99d60 ResolveElementCache: script can now be analyzable parent
So #KT-20096 Fixed
2017-10-23 19:19:04 +03:00
shiraji 31a1fb916a Implement an intention action to move a companion object member to top level
#KT-18828 Fixed

(cherry picked from commit 11f8f8b)
2017-10-23 17:29:28 +03:00