Felix Guo
a71bb70901
KT-18715: don't swallow comments for if->elvis
...
Adds a CommentSaver to the IfThenToElvis intention that will save and
restore comments when converting an if expression to elvis expression.
2019-01-16 09:41:06 +03:00
Mikhail Glukhikh
18ea86cfb4
Remove parentheses: add semicolon before lambda if necessary
...
In 2010b175 , it was suggested just not to suggest parentheses removal.
However, it contradicts with behaviour of "Replace contains" which
adds semicolon before lambda in this case. So in this commit I made
behaviour of remove parentheses the same.
This commit reverts production part of 2010b175
Fixes failing test of "replace contains"
2019-01-10 10:45:46 +03:00
Toshiaki Kameyama
2010b1756e
Remove unnecessary parentheses: don't suggest when parentheses are for lambda
2019-01-09 12:16:01 +03:00
Nicolay Mitropolsky
41b6bcf8c3
Converting object literal to class allows to choose a name (KT-19254)
2019-01-09 11:12:47 +03:00
Marcin Moskala
686cfa6fd2
Fix common misspellings
2018-12-21 16:13:42 +03:00
Mikhail Glukhikh
8f821c9ef5
Merge pull request #2033 from t-kameyama/KT-28699
...
KT-28699 Add "Convert to also" intention
2018-12-18 09:37:34 +03:00
Toshiaki Kameyama
ea0f9d124d
Split property declaration: don't add parentheses for anonymous function
...
#KT-7593 Fixed
2018-12-18 09:28:57 +03:00
Toshiaki Kameyama
6a4c6eacd7
Add "Convert to also" intention
...
#KT-28699 Fixed
2018-12-18 12:21:56 +09:00
Nikolay Krasko
5fb90a8a81
Better caret position after Insert curly braces around variable (KT-28739)
...
Introduce helper class and move caret to it's original position.
#KT-28739 Fixed
2018-12-13 12:36:01 +03:00
Toshiaki Kameyama
9ee9965c7a
Convrt anonymous function to lambda: fix incorrectly conversion
...
#KT-28618
2018-12-06 09:28:56 +03:00
Mikhail Glukhikh
4e1d8fcfd0
Allow to convert nullable local / top to late-init since version 1.2
...
Enhancement for KT-12743
2018-11-29 19:58:11 +03:00
Toshiaki Kameyama
4cf266e99f
Add intentions to convert nullable <--> lateinit var #KT-12743 Fixed
2018-11-29 19:45:10 +03:00
Mikhail Glukhikh
9b4bcabbd3
Fold initializer & if to elvis: add test, rename tests, simplify code
...
Enhancement for KT-27016
2018-11-29 13:20:54 +03:00
Toshiaki Kameyama
fd6f34f8ca
"Replace 'if' with elvis operator": don't suggest on super type check
...
#KT-27016 Fixed
2018-11-29 13:20:54 +03:00
Toshiaki Kameyama
a621171d9b
KT-24515 Intention to add an exception under the cursor to @Throws annotations
2018-11-27 22:21:25 +09:00
Toshiaki Kameyama
4abcd9a053
Make internal: don't suggest for @JvmField property inside companion object of interface #KT-27138 Fixed
2018-11-26 18:39:54 +03:00
Toshiaki Kameyama
726b9272f3
Move out of companion object: don't suggest for @JvmField property inside companion object of interface #KT-28443 Fixed
2018-11-26 18:01:43 +03:00
Mikhail Glukhikh
5502d2de6a
Fix KNPE in "Move member to companion" for expect class #KT-28383 Fixed
2018-11-23 15:35:19 +03:00
Mikhail Glukhikh
41b75346fe
Forbid "introduce backing property" for expect classes #KT-28382 Fixed
2018-11-23 15:35:19 +03:00
Mikhail Glukhikh
10cc4959cc
Forbid "move property to constructor" for expect classes #KT-28381 Fixed
2018-11-23 15:35:18 +03:00
Toshiaki Kameyama
d06b04f025
Add intention to convert SAM lambda to anonymous object #KT-25718 Fixed
2018-11-23 01:05:42 +03:00
Toshiaki Kameyama
f1a0cefde0
Convert concatenation to template: remove 'toString()' call #KT-6025 Fixed
2018-11-22 15:55:32 +03:00
Toshiaki Kameyama
e5f0f2489f
Introduce backing property: fix false positive for const property #KT-28341 Fixed
2018-11-21 17:51:34 +03:00
Toshiaki Kameyama
8b2fef3812
Remove explicit type specification: don't propose for ext function type
...
#KT-8875 Fixed
2018-11-16 16:35:04 +03:00
Mikhail Glukhikh
503f061c8c
Forbid suggesting "iterate over" on expression with Nothing type
...
#KT-14555 Fixed
2018-11-13 10:15:49 +03:00
Mikhail Glukhikh
da39d45cb1
Add more "non properties" for atomic classes #KT-25953 Fixed
2018-11-13 10:15:49 +03:00
Timo Obereder
3c75d46328
Correctly handle end-of-line comment in "Add braces to if"
...
#KT-27408 Fixed
2018-11-08 10:33:15 +03:00
Toshiaki Kameyama
c9477d94ad
Replace if with when: fix behavior on 'else if' #KT-4645 Fixed
2018-11-07 19:02:11 +03:00
Toshiaki Kameyama
4a82f50e79
Convert concatenation to template: omit braces when converting 'this' #KT-7555 Fixed
2018-11-06 11:03:08 +03:00
Toshiaki Kameyama
1df15612d6
Unnecessary parentheses in function call with lambda: fix false positive #KT-26669 Fixed
2018-10-31 11:45:48 +03:00
Mikhail Glukhikh
6e10235208
Make "Add name(s) to call arguments" available for generic arguments
...
#KT-15550 Fixed
2018-10-27 12:13:42 +03:00
Toshiaki Kameyama
749fd5dd80
"Convert property to function" intention: don't suggest if property has @JvmField annotation #KT-27157 Fixed
2018-10-11 21:01:27 +03:00
Toshiaki Kameyama
487b1e96be
"Introduce backing property" intention: don't suggest if property has @JvmField annotation #KT-27156 Fixed
2018-10-11 21:00:44 +03:00
Toshiaki Kameyama
ca335880eb
"Convert property initializer to getter" intention: don't suggest if property has @JvmField annotation #KT-27139 Fixed
2018-10-11 20:59:33 +03:00
Toshiaki Kameyama
3866c85a34
Add accessor intention: don't suggest if property has @JvmField annotation #KT-27139 Fixed
2018-10-11 20:59:33 +03:00
Toshiaki Kameyama
061aa63a73
"Make private" intention: fix some false positive cases
2018-10-11 17:20:46 +03:00
Toshiaki Kameyama
c65e246e02
Make private: don't suggest if property has @JvmField annotation
...
#KT-27138 Fixed
2018-10-11 17:20:13 +03:00
Toshiaki Kameyama
1c8e75eb34
if then to elvis: propose transformation to 'let' #KT-26653 Fixed
2018-10-09 11:41:06 +03:00
Toshiaki Kameyama
f4a637a72e
"Convert object literal to lambda" inspection: report at INFORMATION level if object literal has 'return' #KT-27116 Fixed
2018-10-04 13:13:52 +02:00
Toshiaki Kameyama
c1013cc198
"Convert to secondary constructor": Fix false positive with delegation #KT-27061 Fixed
2018-09-26 09:31:12 +03:00
Toshiaki Kameyama
3e4d8eba76
Add braces: Remove new line between '}' and 'else' #KT-26839 Fixed
2018-09-25 11:08:49 +03:00
Mikhail Glukhikh
94789c50b9
Do not suggest adding 'name =' before single vararg argument
...
This fixes two named argument intention tests
2018-09-18 11:50:43 +03:00
Mikhail Glukhikh
9694882db6
Fix testEnumClass (implementAsConstructorParameter)
2018-09-18 11:50:42 +03:00
Alexander Podkhalyuzin
baa0f2dc1b
Override completion in expect class should behave differently
...
Caret placement is at the end of new fun/property
#KT-25313 Fixed
2018-09-10 14:23:48 +03:00
Mikhail Glukhikh
485e098ced
Handle implicit receivers more accurately in if-then to safe access
...
#KT-26599 Fixed
2018-09-07 17:24:19 +03:00
Toshiaki Kameyama
de6fdc5733
Move to constructor: choose property use-site target more precisely
...
#KT-26015 Fixed
2018-09-07 14:56:17 +03:00
Mikhail Glukhikh
53e7778078
Add modifiers on the same line even after annotation #KT-26492 Fixed
2018-09-05 13:05:08 +03:00
Mikhail Glukhikh
68da28edb9
Fix some tests bound to changed annotation formatting
2018-08-31 15:03:25 +03:00
Toshiaki Kameyama
bae754a266
Foldable if-then: do not highlight for is checks #KT-24978 Fixed
2018-08-30 18:30:45 +03:00
Toshiaki Kameyama
c6db26ba91
"Replace 'if' with elvis operator": Don't suggest on nullable type check #KT-25886 Fixed
2018-08-27 13:33:46 +03:00