Commit Graph

1095 Commits

Author SHA1 Message Date
Toshiaki Kameyama e4a1c8dcef Anonymous function to lambda: add lambda parameter if type parameter is used, even if parameter is unused
#KT-39393 Fixed
2020-06-05 17:32:35 +03:00
Roman Golyshev 7d662bf5d1 Change testData for IntentionsTestGenerated to avoid using javax and sql packages
- Those packages are missing in the mockJdk 1.8 in intellij repository,
and it leads to those tests failing in kotlin-ide repository
2020-06-05 16:03:51 +03:00
Toshiaki Kameyama 46ab338ea6 "Convert anonymous function to lambda expression" intention: add necessary lambda type parameter
#KT-37748 Fixed
2020-06-04 23:38:29 +03:00
Toshiaki Kameyama 343af60cb4 Add intention to expand boolean expression
#KT-38597 Fixed
2020-06-02 23:52:06 +03:00
Yunir Salimzyanov 3b9000cc0c Cleanup 191 extension files (KTI-240) 2020-06-01 18:43:10 +03:00
Toshiaki Kameyama 45d60baeb0 Add import for member: don't suggest if a class with the same name has been imported
#KT-38492 Fixed
2020-06-01 21:42:04 +09:00
Toshiaki Kameyama 329f0227ec Remove explicit type specification: do not suggest for suspend function type
#KT-38310 Fixed
2020-06-01 21:42:04 +09:00
Toshiaki Kameyama 5b927d798c Replace explicit parameter with it: don't suggest if overload resolution ambiguity error occurs
#KT-20795 Fixed
2020-06-01 21:42:03 +09:00
Toshiaki Kameyama 69a2697598 Convert lambda to reference: add type parameter to outer call expression if needed
#KT-37744 Fixed
2020-06-01 21:42:03 +09:00
Toshiaki Kameyama a4239afcb3 Convert to anonymous function: do not suggest for suspend functions
#KT-37842 Fixed
2020-06-01 21:42:03 +09:00
Toshiaki Kameyama 8f3392d635 Convert lambda to reference: fix it works correctly in anonymous object
#KT-31682 Fixed
2020-06-01 21:42:02 +09:00
Toshiaki Kameyama b9fab1123d Convert lambda to reference: fix it works correctly for labeled expression
#KT-37214 Fixed
2020-06-01 21:42:02 +09:00
Yan Zhulanow ef698a5747 Fix "PSI/index mismatch" in case of @ParameterName on non-functional types (KT-34524) 2020-05-27 02:38:41 +09:00
Toshiaki Kameyama 581f83421a Unnecessary parentheses in function call with lambda: don't report for function named 'suspend'
#KT-22878 Fixed
2020-05-27 02:38:40 +09:00
Toshiaki Kameyama 777995a3a0 Add braces: don't insert extra line break and move the following comment
#KT-36194 Fixed
2020-05-27 02:38:40 +09:00
Toshiaki Kameyama 81d01a8f8e "To ordinary string literal": don't add unnecessary escapes to characters in template expression
#KT-36406 Fixed
2020-05-27 02:38:40 +09:00
Toshiaki Kameyama f7a69d4aa7 Convert lambda to reference: suggest on lambda argument for suspend function parameter
#KT-34378 Fixed
2020-05-27 02:38:39 +09:00
Toshiaki Kameyama 9b6b25f069 Convert lambda to reference: suggest on lambda argument for extension function parameter
#KT-22014 Fixed
#KT-22015 Fixed
2020-05-27 02:38:39 +09:00
Toshiaki Kameyama a2f55e8b7c Remove redundant calls of the conversion method: report for unsigned types
#KT-30263 Fixed
2020-05-27 02:38:39 +09:00
Dmitry Gridin 50506658c0 fix some tests for as36 2020-05-08 19:13:28 +07:00
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00
Toshiaki Kameyama 77b6881032 Replace 'when' with 'if': do not suggest if 'when' is used as expression and it has no 'else' branch
#KT-35329 Fixed
2020-04-15 22:47:30 +02:00
Toshiaki Kameyama b4c62cdb52 Introduce "Add missing 'class' keyword" intention
#KT-14884 Fixed
2020-04-15 14:53:52 +02:00
Toshiaki Kameyama 9b3c3ae4ba "Replace 'invoke' with direct call" intention: do not add unnecessary parenthesis
#KT-37967 Fixed
2020-04-15 09:59:23 +02:00
Toshiaki Kameyama 2f29b38b19 "Replace 'invoke' with direct call" intention: fix false positive when function is not operator
#KT-37977 Fixed
2020-04-15 09:16:50 +02:00
Dmitry Gridin 585177bcf7 Formatter: fix indent for multiline expression in string template
#KT-35359 Fixed
2020-04-14 13:54:12 +00:00
Toshiaki Kameyama a96b359a09 "Remove braces from 'if' statement": do not suggest when lambda is directly under 'if'
#KT-35994 Fixed
2020-04-02 12:52:11 +03:00
Toshiaki Kameyama 30366148bf Convert to block body: adjust line indent
#KT-22368 Fixed
2020-04-02 12:48:05 +03:00
Toshiaki Kameyama c344b85d4e Convert parameter <-> receiver intention: do not add label to 'this' if not needed
#KT-17615 Fixed
#KT-30028 Fixed
#KT-32809 Fixed
#KT-28085 Fixed
#KT-37508 Fixed

Convert receiver to parameter:

#KT-37508 Fixed
2020-04-01 13:26:55 +03:00
Toshiaki Kameyama 34cfe7dfdb "Add missing component" intention: fix it works correctly if entries is empty
#KT-36094 Fixed
2020-04-01 00:42:43 +03:00
Toshiaki Kameyama 6a1923a477 "Convert to anonymous object" intention: suggest for kotlin fun interface
#KT-37749 Fixed
2020-03-31 12:17:16 +03:00
Roman Golyshev f656cd2889 KT-37781 Add FUN_KEYWORD to MODIFIERS_ORDER
- This way it is inserted before visibility modifiers
- ^KT-37781 Fixed
2020-03-26 19:37:10 +03:00
Vladimir Dolzhenko 344dbeffe8 Fix IntentionTestGenerated$IntroduceImportAlias.testConflictPackage
Fix test data as find usages can handle import aliases

Relates to #KT-18619
2020-03-22 15:30:49 +01:00
Dmitry Gridin 95b77f6386 AddJvmOverloadsIntention: disable for annotation classes
#KT-36482 Fixed
2020-03-18 13:51:56 +00:00
Dmitry Gridin b4898e4043 Put arguments/parameters on separate/one line should update trailing comma
#KT-36411 Fixed
2020-03-03 21:53:11 +07:00
Toshiaki Kameyama e406669190 Invert if condition intention: don't add unnecessary 'continue'
#KT-12329 Fixed
2020-02-24 11:17:20 +01:00
Toshiaki Kameyama 699ea0aa2b Replace 'if' with 'when': don't swallow comments if there is no synthetic else branch
#KT-34640 Fixed
2020-02-22 16:50:37 +01:00
Toshiaki Kameyama d8ab046136 Convert property to function: remove annotation use-site target
#KT-36834 Fixed
2020-02-21 17:03:26 +01:00
Toshiaki Kameyama d5e71ebef1 Invert if condition intention: 'isEmpty' <-> 'isNotEmpty'
#KT-34593 Fixed
2020-02-21 16:39:35 +01:00
Toshiaki Kameyama 79c15e49b6 Convert function to property: suggest on fun keyword
#KT-34450 Fixed
2020-02-21 16:32:17 +01:00
Roman Golyshev 4042214bb2 Fix tests broken by enhanced RedundantSamConstructor inspection
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00
Pavel Kirpichenkov fda8d7de8b [IDEA-TESTS] Specify language version in feature-dependent tests
Some quickfixes are relying on diagnostics, that won't be reported
with new language features enabled.
`MixedNamedArgumentsInTheirOwnPosition`
`AllowBreakAndContinueInsideWhen`
2020-02-17 10:56:46 +03:00
Toshiaki Kameyama 8baba38099 "To raw string literal" intention: fix false negative with string content starts with newline symbol \n
#KT-36369 Fixed
2020-02-12 16:15:18 +03:00
Dmitry Gridin 6c439ae85a Create TrailingCommaIntention
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin c34b417d0c Fix tests after disabling trailing comma
#KT-34744
2020-02-04 21:34:53 +07:00
Toshiaki Kameyama ebe3619251 KT-33384 Intention to switch between single-line/multi-line lambda (#2790)
Add intention for single-line lambda <-> multi-line lambda conversion

#KT-33384 Fixed
2020-01-29 12:32:26 +03:00
Toshiaki Kameyama 59f70a912a Convert to lambda reference: don't suggest when lambda is argument for 'suspend' function parameter
#KT-16907 Fixed
2020-01-27 11:31:16 +03:00
Toshiaki Kameyama 2daedc98b5 KT-35648 RemoveArgumentNameIntention: Support MixedNamedArgumentsInTheirOwnPosition
- ^KT-35648 Fixed
2020-01-21 11:43:37 +03:00
Dmitry Gridin d06787886a Fix tests after implementing trailing comma in formatter
#KT-34744
2020-01-17 21:02:54 +07:00
Nikolay Krasko c372dc7f0a Fix AmbiguousCalls in >= 192 2019-12-25 14:05:13 +03:00