Commit Graph

30 Commits

Author SHA1 Message Date
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
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
Andrey Cherkasov
ffa5645c5a [java] DeleteSwitchLabelFix: fixes after review
IJ-CR-100868

GitOrigin-RevId: ae9944525daafd4ff61134837779779621272f84
2023-03-03 18:54:09 +00:00
Andrey Cherkasov
468b4d470a [java] DeleteSwitchLabelFix must produce 'default:' instead of 'case default:'
IDEA-309550

GitOrigin-RevId: 3224934e68d9b0f9008fe7305f0209d3487a7f65
2023-01-04 12:39:33 +00:00
Andrey.Cherkasov
7615667adc [java-intentions] UnwrapSwitchLabelFix: rewrite record pattern support
IJ-CR-27938
IDEA-297387

GitOrigin-RevId: d275fd7a37d6b4e955cdc654bd676cb9048601be
2022-10-17 14:57:44 +00:00
Tagir Valeev
c1e672960d [java-inspections] UnwrapSwitchLabelFix: try to collapse after unwrap
GitOrigin-RevId: 21428eb3209594c00dc1d81c3d4cda3a7276e3fb
2022-09-20 09:26:47 +00:00
Tagir Valeev
6ffb7e417e [java-dfa] Extract "Constant conditions" into separate "Constant values" inspection (IDEA-58235)
GitOrigin-RevId: 95a81fcd1546afec31afc2a044a9ba5fa1337411
2022-09-08 21:30:59 +00:00
Tagir Valeev
dd689d3a39 [java-inspections] More tests for preview
GitOrigin-RevId: 6b6405ee4491ad1d58947547c40df6fb2d291ab7
2022-07-29 17:54:59 +00:00
Andrey.Cherkasov
d4573c53c8 [java-inspections] "Remove unreachable branches" quick-fix breaks code on switch expression
IDEA-296911

GitOrigin-RevId: 1fdfb95aa6396476b40bf0d7be62a1617e70f858
2022-06-28 03:52:04 +00:00
Andrey.Cherkasov
96cd89dd5d [java-inspections] False negative "Constant conditions & exceptions"
IDEA-296900

GitOrigin-RevId: 58bd64b886d5d2c5c359f34d1df2fdb639495114
2022-06-28 03:52:03 +00:00
Tagir Valeev
11e94e5f6d [java-dfa] IDEA-294256 Add default branch automatically if unreachable branch is detected in exhaustive switch
GitOrigin-RevId: 48f2f396c317447d54d18d382cef61b3498355c3
2022-05-18 13:21:54 +00:00
Ilyas Selimov
dfc4b58130 java - unwrap switch label fix: reused a code surrounder to define whether the fix is possible in particular context
GitOrigin-RevId: 75cdf659df8ebf4634c69cf9d472904ae24326af
2021-11-22 16:17:05 +00:00
Ilyas Selimov
c3a56381e7 java - unwrap switch label fix: support used pattern variables in the switch
GitOrigin-RevId: 47387f009a92a5e17846da4fa131f754234d7cf6
2021-11-16 11:11:07 +00:00
Ilyas Selimov
f71e23592f IDEA-270442 - DFA for pattern in switch: initial patterns support
GitOrigin-RevId: 3f130f6abad7cd0143f5d30b48ec988fa5b8a633
2021-10-18 17:20:18 +00:00
Andrey.Cherkasov
0ad9f84d7e [java-highlighting] Provide fix "Remove switch label/branch" for "Label is dominated by a preceding case label " error
IDEA-272296

GitOrigin-RevId: a70292dd55645854de65ebee4d5d0f8ed6c8958c
2021-10-01 20:26:12 +00:00
Ilyas Selimov
549bb827f0 IDEA-278082 - supported duplicates highlighting for total patterns
GitOrigin-RevId: c262a38924c0ce72464d92825af45302b9f24625
2021-09-16 09:04:17 +00:00
Andrey.Cherkasov
8e0a546003 Fixes after IJ-CR-12522
GitOrigin-RevId: 828b51e578364351368a3bfa5456c5f58b6235f8
2021-08-06 11:23:43 +00:00
Andrey.Cherkasov
c582d1c4c4 IDEA-273865 Duplicates in the switch: provide the quick-fix
GitOrigin-RevId: 4f4e0965726596bf9b188b16b100e13a0072b38b
2021-08-01 19:33:26 +00:00
Andrey.Cherkasov
c8e763e188 Provide fix "Remove switch label/branch" for the "'switch' has both a total pattern and a default label" error
IDEA-272573

GitOrigin-RevId: 37262fbd3543791b41513f6f1bea1970c8d3183c
2021-07-27 00:30:31 +00:00
Anna Kozlova
bd1a21a02a bump highest language level to 14, prepare to remove 13_preview
GitOrigin-RevId: ec42a9047ba63b0cbaddd8357d11ae2ed56ed6b6
2020-04-01 12:31:42 +00:00
Anna Kozlova
2e17e61cae remove language level 12 preview for 2019.3 release
IDEA would support latest preview only

GitOrigin-RevId: 6609e80acced9e1be07880c14de239f75afcc78b
2019-07-09 00:03:25 +03:00
Tagir Valeev
98347e5018 IDEA-203984 "Remove unreachable branches" quickfix breaks code on switch expression 2018-12-11 15:48:48 +07:00
Tagir Valeev
0d96d61986 IDEA-203119 Unwrap switch statement: support expressions 2018-11-28 19:00:05 +07:00
Tagir Valeev
81c9810bde IDEA-203119 Unwrap switch statement: support rule-cases and multiple expression cases 2018-11-28 19:00:04 +07:00
Tagir Valeev
6bc07438c6 Support of enhanced Java 12 switch statements in DFA (IDEA-202132, no expressions yet) 2018-11-16 12:06:16 +07:00
Tagir Valeev
747aec38c9 ConvertSwitchToIfIntention: better comments handling 2018-10-23 15:34:51 +07:00
Tagir Valeev
50abafa3f8 UnwrapSwitchLabelFix: when only one switch branch is reachable
Fixes IDEA-200651 Analysis for 'switch' statements may determine always truthy conditions on branches in addition to always falsy
Minor refactoring of reporting in DataFlowInspectionBase
2018-10-17 16:39:25 +07:00
Tagir Valeev
1554b0c513 DeleteSwitchLabelFix: check again whether the whole branch should be removed when fix is actually applied
Fixes IDEA-200021 Red code after applying 'Fix all 'Constant conditions and exception' problems in the file' with multiple case labels
2018-10-08 14:09:25 +07:00
Tagir Valeev
5663e0bde8 IDEA-200030 Quick-fix to remove unreachable should remove body only if previous branch has 'break' at the end 2018-10-08 10:57:50 +07:00
Tagir Valeev
5fc3612fa9 DeleteSwitchLabelFix: delete unreachable switch branch
Fixes IDEA-199692 Quickfix to delete unreachable switch branch reported by "constant conditions & exceptions"
2018-10-01 14:54:36 +07:00