Commit Graph

1026 Commits

Author SHA1 Message Date
Toshiaki Kameyama d4e4a4c3e7 To ordinary string literal: remove 'trimIndent()' if string is single line
#KT-32616 Fixed
2019-08-27 22:21:49 +03:00
Toshiaki Kameyama a3c3ab08fd Override/Implement members: place members in the same order as super class members 2019-08-26 13:18:31 +07:00
Igor Yakovlev 5a511dd635 Refactor and fix of the run/apply/let/also intention converter
1) Optimize and refactored code
2) Added support for correct renaming of target identifier to this/it
3) Added support of cases with difficult application targets (like: var x = 1 + 2)
4) Show error hint when refactoring failed for some reason
5) Improved intention applicability checking to eliminate false-positive cases
6) Fixed EA-209577
2019-08-23 19:37:00 +03:00
Toshiaki Kameyama f5c0a30c51 Add intention to replace "Map.getOrDefault"
#KT-21503 Fixed
2019-08-07 17:38:15 +03:00
Ilya Kirillov 02f2009f2a Do not show "Replace overloaded operator with function call" intention on incomplete expressions
#KT-33115 fixed
2019-08-05 15:14:27 +03:00
Toshiaki Kameyama 80b09b9a08 Replace 'if' with 'when': don't remove branch brances
#KT-32650 Fixed
2019-08-01 16:05:06 +03:00
Vadim Brilyantov 60e3787800 Tests for Sealed Class move + Fix invalid move declaration test
MoveDeclarationToSeparateFile.testSealed test was threated to check that the intention is not applicable but it currently is.
2019-07-17 15:53:58 +03:00
Toshiaki Kameyama 1f89c0f730 "Convert to sealed class" intention: don't suggest when no "class" keyword
#KT-32365 Fixed
2019-07-05 19:28:02 +07:00
Toshiaki Kameyama 9786564d75 "Remove argument name" intention: remove array literal brackets for annotation vararg argument
#KT-32318 Fixed
2019-07-05 19:18:40 +07:00
Dmitry Gridin 33914a3a94 ImportMemberIntention: make more flexible based on caret position
#KT-31924 Fixed
2019-07-02 11:54:38 +07:00
Dmitry Gridin 8e0bbe7d4a Convert ReplaceSingleLineLetIntention to inspection & decrease severity to INFORMATION
#KT-32010 Fixed
2019-06-25 14:37:04 +07:00
Toshiaki Kameyama fbd992f8c7 Add intentions to convert lazy <--> ordinary property
#KT-23501 Fixed
2019-06-17 01:10:19 +03:00
Dmitry Gridin f2accb7b9e Convert IfThenToElvisIntention to inspection & decrease severity to INFO
#KT-16067 Fixed
2019-06-07 12:23:54 +07:00
Dmitry Gridin 74c177fd26 Convert FoldInitializerAndIfToElvisIntention to inspection and decrease severity to INFO
#KT-19643 Fixed
2019-06-07 12:23:54 +07:00
Toshiaki Kameyama 1c32941949 Use property access syntax: don't report when setter argument is lambda
#KT-30627 Fixed
2019-06-06 18:53:15 +07:00
Toshiaki Kameyama 4c62788c3e Make "Add operator modifier" an inspection instead of intention
#KT-31533 Fixed
2019-06-05 19:27:52 +07:00
Dmitry Gridin 7bc2fcd657 Convert RemoveCurlyBracesFromTemplateIntention to inspection
Relates to #KT-31717
2019-06-03 16:37:37 +07:00
Dmitry Gridin 8988b4b344 Convert ReplaceSubstringIntention to ReplaceSubstringInspection
Relates to #KT-31502
2019-05-29 11:00:28 +07:00
Dmitry Gridin 2310826ec9 Remove MergeWhenIntention
Relates to #KT-31502
2019-05-29 11:00:28 +07:00
Dmitry Gridin 41daf99346 Remove IfThenToDoubleBangIntention
Relates to #KT-31502
2019-05-29 11:00:28 +07:00
Dmitry Gridin afcb2f3436 Remove ConvertIfWithThrowToAssertIntention
Relates to #KT-31502
2019-05-29 11:00:28 +07:00
Dmitry Gridin d3339cae46 Merge ReplaceMathMaxWithCoerceAtLeastIntention & ReplaceMathMinWithCoerceAtMostIntention with ReplaceJavaStaticMethodWithKotlinAnalogInspection
Relates to #KT-31502
2019-05-29 11:00:28 +07:00
Dmitry Gridin 26478b1374 Remove ConvertTrimMarginToTrimIndentIntention
Relates to #KT-31502
2019-05-29 11:00:28 +07:00
Dmitry Gridin 0b9b49d7bc Remove ConvertTrimIndentToTrimMarginIntention
Relates to #KT-31502
2019-05-29 11:00:27 +07:00
Dmitry Gridin 91e9ed25f7 Remove ConvertNegatedBooleanSequenceIntention
Relates to #KT-31502
2019-05-29 11:00:27 +07:00
Dmitry Gridin dd03a81309 Remove ConvertClassToSealedClassIntention
Relates to #KT-31502
2019-05-29 11:00:27 +07:00
Dmitry Gridin 1adc2ae4c8 Remove ConvertAssertToIfWithThrowIntention
Relates to #KT-31502
2019-05-29 11:00:27 +07:00
Dmitry Gridin 76c2c2a5e9 Allow "Add val/var to primary constructor parameter" for inline & annotation classes
Relates to #KT-29731
2019-05-24 15:55:01 +07:00
Dmitry Gridin 1097bc76af Don't suggest Add val/var to parameter at expect class constructor
#KT-29731 Fixed
2019-05-24 15:55:01 +07:00
Dmitriy Novozhilov f54653eb2b [NI] Fix error type approximation in ILTApproximatorConfiguration
#KT-31441 Fixed
2019-05-23 12:22:42 +03:00
Toshiaki Kameyama 2c424afefa Elvis -> if intention: don't produce boilerplate code for return/break/continue/throw in RHS
#KT-14369 Fixed
2019-05-20 11:15:41 +03:00
Toshiaki Kameyama 6ff776ba65 Convert property to function: fix incorrectly conversion when property has explicit generic type
#KT-29192 Fixed
2019-05-19 14:57:25 +07:00
Toshiaki Kameyama 04638eea6b Remove braces intention: fix caret position
#KT-31443 Fixed
2019-05-17 11:18:44 +07:00
Mikhail Glukhikh b4a63794e5 Add name to argument: support old-style comment deletion 2019-05-13 12:33:52 +03:00
Mikhail Glukhikh b0d294b50c Use candidate descriptor to determine parameter name stability in IDEA
#KT-31349 Fixed
2019-05-13 12:33:52 +03:00
Mikhail Glukhikh 955bfd6e7b Introduce "add parameter names to following arguments"
This commit also refactors relevant intentions & inspections,
like "add name to argument", "add names to call arguments",
"unnamed boolean literal argument"

#KT-30622 Fixed
2019-05-13 12:33:39 +03:00
Mikhail Zarechenskiy c95eddbbbe [IDE-NI-MIGRATE] Migrate few tests for new inference 2019-05-06 13:59:28 +03:00
Dmitriy Novozhilov 3d5593c70c [IDE-NI-MIGRATE] [BAD] Migrate testdata of Intention tests
Issues:
- #KT-31263

Bad tests:
- SamConversionToAnonymousObject.testSimple3
- ConvertReferenceToLambda.testIf1
- ConvertReferenceToLambda.testIf2
- ConvertReferenceToLambda.testIf3
- ConvertReferenceToLambda.testIf4
- ConvertReferenceToLambda.testWhen1
- ConvertReferenceToLambda.testWhen2
- ConvertReferenceToLambda.testWhen3
- ConvertReferenceToLambda.testWhen4
- ConvertLambdaToReference.testVarargFunction2
2019-05-06 11:36:23 +03:00
Toshiaki Kameyama f2c7b6b8c4 Convert to anonymous object: don't remove type arguments
#KT-30208 Fixed
2019-04-22 16:09:53 +07:00
Toshiaki Kameyama 075620daad Invert if condition intention: don't remove line breaks
#KT-30900 Fixed
2019-04-22 15:59:49 +07:00
Burak Eregar 1455451601 Fix "Replace !! with if-then" inspection in receiver position
#KT-5412 Fixed
2019-04-11 18:58:05 +03:00
Toshiaki Kameyama 401d8c2d70 Add braces: don't move EOL comment when if statement is single statement
#KT-28619 Fixed
2019-04-11 18:58:04 +03:00
Toshiaki Kameyama 93d854362b Convert to anonymous function: do not name argument when lambda is Java method
#KT-30613 Fixed
2019-04-11 18:34:24 +03:00
Dereck Bridie 7da52b2df5 Fix KT-13962 with kotlin.collections constructors 2019-04-08 14:53:27 +03:00
Dmitry Gridin b45aeda711 Fix caret after "Introduce import alias" if invoke in import directive
#KT-30833 Fixed
2019-04-08 11:25:32 +07:00
Austaon 0e716fd528 KT 13962: Intention to replace Java collection constructor calls with function calls from stdlib (ArrayList() → arrayListOf()) 2019-04-05 18:19:26 +03:00
Toshiaki Kameyama f861b10798 Add "Add getter/setter" quick fix for uninitialized property
#KT-30078 Fixed
2019-04-04 11:10:39 +07:00
Dmitry Gridin 3ca1c7b55d "Convert property to function" intention should warn about the property overloads at child class constructor
#KT-29764 Fixed
2019-04-02 22:53:56 +07:00
Burak Eregar 9ab54d0e44 Fix: String templates suggest removing curly braces for backtick escaped identifiers 2019-04-02 11:48:47 +03:00
Toshiaki Kameyama bd3d5a9dbb Use withIndex intention: fix false positive for destructuring declaration
#KT-30341 Fixed
2019-03-21 10:59:01 +03:00