Commit Graph

2338 Commits

Author SHA1 Message Date
Tagir Valeev
1a3e995a6a [java-intentions] IDEA-324419 Suggest 'change implements to extends' fix on constructor call
GitOrigin-RevId: 56fec73701b9d77cbcb98afbf45bc751359989ec
2023-07-05 15:46:15 +00:00
Mikhail Pyltsin
4bc43b46f4 [java-highlighting] IDEA-323955 Record patterns support available only for Java 20 preview. Fix compiler errors and tests
GitOrigin-RevId: 5f856519e56e61818e95cf63766fb6a54c6283ad
2023-07-05 12:09:22 +00:00
Tagir Valeev
bf78f8d6ce [java-intentions] ExpandStaticImportAction, ConvertCompactConstructorToCanonicalAction: ModCommand (IDEA-322693)
Also: i18n

GitOrigin-RevId: e8828e96bf095b567d269cb919b0ec94ff860431
2023-07-04 13:42:53 +00:00
Tagir Valeev
cf2584bfdd [java-inspections] ReplaceWithConstantValueFix: suggest to extract side effects when applicable
Fixes IDEA-323618 Side-effect ignored by code assist

GitOrigin-RevId: 6206743a4af64948f95d722708e42caf05dda2f3
2023-07-03 21:09:36 +00:00
Andrey Cherkasov
1530062b6c Move test files
GitOrigin-RevId: 83389f43c35e596912dc08c51550df67f16d50e5
2023-07-03 14:47:39 +00:00
Tagir Valeev
5ad96f7b38 [java-intentions] More ModCommands (IDEA-322693)
GitOrigin-RevId: ac544ca3f30695ccf6f8c389444d6ab6bb182ade
2023-07-01 12:25:11 +00:00
Tagir Valeev
3df9a89271 [java-inspections] AccessStaticViaInstanceFix: mod-command
IDEA-323888 Replace 'side effect' dialog in Java quick-fixes with chooser

GitOrigin-RevId: 215c1987ee33c6fd14f6fe987bbd491fa3b78343
2023-06-30 09:01:06 +00:00
Tagir Valeev
c55dfd035c [java-inspections] RemoveUnusedVariableFix: mod-command
IDEA-323888 Replace 'side effect' dialog in Java quick-fixes with chooser

GitOrigin-RevId: c89ef0ad65e69348de86e10a20686dbf9f8e0d57
2023-06-30 09:01:03 +00:00
Tagir Valeev
640306d59f [java-inspections] RemoveAssignmentFix, JoinDeclarationAndAssignmentJavaInspection: mod-command action, with chooser
IDEA-323888 Replace 'side effect' dialog in Java quick-fixes with chooser

GitOrigin-RevId: 0ceadfeebf9bf294d5201a641922efba3b8a66be
2023-06-29 10:02:34 +00:00
Tagir Valeev
5b29f251c1 [java-inspections] RemoveInitializerFix2: mod-command action, with chooser
IDEA-323888 Replace 'side effect' dialog in Java quick-fixes with chooser

GitOrigin-RevId: 99e43ec42520ff407ad755c1b05cd5c9320bd273
2023-06-29 10:02:30 +00:00
Tagir Valeev
ad40c945e2 [java-inspections] More quickfixes to ModCommand
GitOrigin-RevId: ccc6093d680712cb81c1325d997fb2771b61a0be
2023-06-25 19:05:51 +00:00
Tagir Valeev
e58fae06c9 [mod-command] ModCreateFile; used in MoveAnnotationToPackageInfoFileFix; tests
GitOrigin-RevId: c894f03c5fdb035fda9662337563368d380cb5fe
2023-06-20 10:22:34 +00:00
Andrey Cherkasov
9ccc820db2 [java] Remove Java 17 Preview and Java 18 Preview language levels
IDEA-314047

GitOrigin-RevId: 8c24deb2dfb5361f08857d7933ab290476f4ce84
2023-06-19 17:37:05 +00:00
Fabrice Tiercelin
c2b459a91e [java-inspections] IDEA-289267 Change highlight to unused code on RedundantArrayForVarargsCall and RedundantLambdaParameterType
Also, new tests

GitOrigin-RevId: 5dbb45fc400ba8de0a360e05a4eaf0aee07e0e83
2023-06-16 20:28:52 +00:00
Tagir Valeev
feb932c66e [java-intentions] More ModCommand actions
GitOrigin-RevId: a336391bae84d99c45b3529cf404905dcf0635dd
2023-06-16 09:48:07 +00:00
Tagir Valeev
9a26cb1f10 [java-inspections] LambdaCanBeMethodReferenceInspection: do not suggest ::isInstance for parameterized classes
Fixes EA-429448 - AE: LambdaCanBeMethodReferenceInspection.lambda$getLambdaToMethodReferenceConversionCandidate$0

GitOrigin-RevId: 71c796f587168bff0990bcff7369f7b189d5bede
2023-06-06 09:51:28 +00:00
Fabrice Tiercelin
94c43389e6 [java-inspections] OrderedBinaryExpression; used in SizeReplaceableByIsEmptyInspection
GitOrigin-RevId: 1fedec592b56b558cd3c6e6ba4348fed7284e5ca
2023-06-05 16:00:36 +00:00
Bas Leijdekkers
1a14d80d26 Java: better quick-fix on reference qualified with primitive (IDEA-321123)
GitOrigin-RevId: e9454c241cce0e0ac5a74cc09267f5c3d695ea1a
2023-06-05 08:56:44 +00:00
Tagir Valeev
29e678487a [mod-command] 36 more quick-fixes converted to ModCommand
GitOrigin-RevId: e896b23b230cd8475035579fd9d27a719ed8c291
2023-05-17 12:33:58 +00:00
Bas Leijdekkers
873cc2268f Java: clarification of inspection message and description
GitOrigin-RevId: 82fb5a32c54291d90bd1266677c8be3ba7b334d4
2023-05-16 19:32:08 +00:00
Mikhail Pyltsin
d59e284004 IJ-CR-107413 [java-inspections] IDEA-314208 Warn when InputStream.read() implementation returns a signed byte. PR
GitOrigin-RevId: b1d54b85bb51377fab754d545e164f9550fbde5c
2023-05-15 17:20:21 +00:00
Mikhail Pyltsin
d2645f66ba IJ-CR-107309 [java-inspections] IDEA-303605 Constant expression - new option to skip reference. PR
GitOrigin-RevId: da46a96d7203ed55853eb6376d6404a69899c479
2023-05-15 14:47:25 +00:00
Mikhail Pyltsin
3ae8ed0f14 [java-inspections] IDEA-314208 Warn when InputStream.read() implementation returns a signed byte
GitOrigin-RevId: 761b1c91c48501bfeebd47bc29a338a2d4d8098d
2023-05-11 20:58:45 +00:00
Tagir Valeev
91d8908e77 [mod-command] Support fix-all option; ConvertExpressionToReturnFix: ModCommandAction
GitOrigin-RevId: 0dbcc3cfdd1d945921f21b23195b75634a3de081
2023-05-11 10:51:35 +00:00
Tagir Valeev
92839cf245 [mod-command] AddExceptionToCatchFix: ModCommandAction; injection test
GitOrigin-RevId: 9a3ab90be0420b79f913c96b0d0101e538e6fca6
2023-05-10 18:16:50 +00:00
Tagir Valeev
ff7bded456 [mod-command] EditorUpdater#select(TextRange); fix injection handling
GitOrigin-RevId: c1c412601661e7bf8231d12e024bb53109d010ba
2023-05-10 18:16:48 +00:00
Tagir Valeev
e31a010d64 [mod-command] Allow to register ModCommandAction-based intentions
Also: ModCommandAction.Presentation; MergeFilterChainAction converted to ModCommandAction; API updates; documentation

GitOrigin-RevId: fe31dc71f1f0ae3ff71ef578ad22c5dd555783de
2023-05-10 18:16:37 +00:00
Mikhail Pyltsin
913fd3db6f [java-inspections] IDEA-303605 Constant expression can be evaluated - new option to skip non-literal exception
GitOrigin-RevId: 5adb14cc5d812c28ca811095e042ec18023a92d9
2023-05-10 13:01:51 +00:00
Tagir Valeev
d75b5e726f [mod-command] PsiUpdateContext#moveToPrevious; AddFinallyFix -> ModCommandAction
GitOrigin-RevId: 56625a1739da460bcc71712ae4ad682f2ce200c7
2023-05-05 19:45:51 +00:00
Mikhail Pyltsin
5032fa91dd [java-inspections] IDEA-318681, IDEA-318678, IDEA-318677, IDEA-318676 Improve previews, get rid of external annotations
GitOrigin-RevId: 57d45849299ce12c5ec19d84dcabdaaee00c3831
2023-04-25 18:46:31 +00:00
Mikhail Pyltsin
068020ddd6 [java-inspection] IDEA-311127 Not find static import. Fix one more case
GitOrigin-RevId: a45f353468b849238dab2533c87b1f18740ec395
2023-04-25 11:16:42 +00:00
Tagir Valeev
4c29ff02f6 [java-inspections] TrivialFunctionalExpressionUsageInspection: solve naming conflicts instead of keeping the block
Keeping the block does not work correctly for blocks with return statement

GitOrigin-RevId: d14e22e793840d74957928a8d7748275db4929ef
2023-04-24 11:48:09 +00:00
Bas Leijdekkers
d433c91b2a Java: add quick-fix and clarify error message (IDEA-318627)
GitOrigin-RevId: ef8be0f040f1321b85d8751fe8b59825d2298da9
2023-04-22 00:57:57 +00:00
Mikhail Pyltsin
d629bc2dd0 [java-inspection] IDEA-311127 Not find static import
GitOrigin-RevId: 17ab10bf548ca6d5299e4059f476d56c832fdbca
2023-04-19 15:08:36 +00:00
Tagir Valeev
78c8e66901 [java-inspection] Support multi-line single-return lambdas in StreamToLoopInspection
Part of IDEABKL-7718
Fixes IDEA-317735

GitOrigin-RevId: 120245c2b1f4abb464d52c43dd39078a83f4bbcd
2023-04-17 10:53:11 +00:00
Mikhail Pyltsin
24c3529b7b [java-inspections] IDEA-316416 else in do while
GitOrigin-RevId: 841d0325f0ad3b580a6b494bdba7c43305dda974
2023-04-13 15:55:13 +00:00
Mikhail Pyltsin
4882e88dbf [java] support comparing when method is a first operand
GitOrigin-RevId: 64895b894c8dee5c178bfb336a4f2f30872a13c4
2023-04-13 13:06:16 +00:00
Mikhail Pyltsin
cab7eb3b00 [intention-preview] IDEA-317060 fix creation of a statement from expression
GitOrigin-RevId: 95c10072de86b6c86354823c9dec8a828bebcef4
2023-04-07 16:18:01 +00:00
Bas Leijdekkers
684fab8ee9 Java: calculate type correctly for "mixed notation" vararg declarations
GitOrigin-RevId: 231d9bf7091be67532e08f698e1e94e5013c0744
2023-03-29 16:53:08 +00:00
Bas Leijdekkers
a9d979654e Java: Better error message and quick-fix for C-style array declaration in vararg parameter (IDEA-316131)
GitOrigin-RevId: 182bf576b00e2bddddb3767d1cd938a625337778
2023-03-29 16:52:55 +00:00
Jan Kleprlik
43a43dfadd [OC-23442] fix move multiple psi preview html
GitOrigin-RevId: 57e19c65b66cc7fdb52f13b5b07405f81ba2b38c
2023-03-28 19:08:44 +00:00
Bas Leijdekkers
7980952817 Java: Add quick fix for "Vararg record component must be the last in the list" (IDEA-316182)
GitOrigin-RevId: f172229f06d5d21f0fcdcdc396931cd2867ac6c7
2023-03-28 12:31:57 +00:00
Bas Leijdekkers
52bd620329 Java: add test (IJ-CR-104313)
GitOrigin-RevId: 2532de7d6bf931c2bf11df363d6f0a0625e5412e
2023-03-25 10:38:46 +00:00
Tagir Valeev
5ab495db61 [java-intention] Intersection type test for IDEA-314907
GitOrigin-RevId: 90316415e2fff0e298ee2026f1e21f278c896c0d
2023-03-21 17:24:02 +00:00
Andrey Cherkasov
7a4cf98cdd [java-inspections] Blank line should be replaced with <p>: false positive when multiple blank lines before block tag
IDEA-315871

GitOrigin-RevId: 40520ca3deae8894318cd7ef0fde19c9935a4f64
2023-03-21 13:54:48 +00:00
Andrey Cherkasov
692e481786 [java-inspections] Blank line should be replaced with <p>: false positive before block tag with attribute
IDEA-315869

GitOrigin-RevId: 249ec615b55dc20a53820cd152974dcad1768cb3
2023-03-21 13:54:43 +00:00
Andrey Cherkasov
331564d43b [java-inspections] Blank line should be replaced with <p>: ignore inside {@snippet} block
IDEA-311514

GitOrigin-RevId: 4f0b12af678e8049ae02487f22827b91bfa25fe0
2023-03-21 13:54:38 +00:00
Mikhail Pyltsin
944428df33 IJ-CR-103424 [java-inspections] IDEA-313911 Convert calls with ChronoField and ChronoUnit. Move packages
GitOrigin-RevId: 1eba73d58e59dd4991cbb40921abd83c7eb0d0af
2023-03-21 11:03:56 +00:00
Tagir Valeev
62741ff30a [java-inspections] SwitchStatementWithTooFewBranchesInspection: deal with side effects when unwrapping switch expression
GitOrigin-RevId: 65421bfe8edf8962161919991fbb9eaa3671f6d9
2023-03-20 17:26:22 +00:00
Tagir Valeev
338f8674e2 [java-intentions] ConvertSwitchToIfIntention: properly add parentheses when equals() is used
GitOrigin-RevId: cf05261337ac10785b23338860ab039fca271373
2023-03-20 17:26:19 +00:00