13 Commits

Author SHA1 Message Date
Georgii Ustinov
29caccb845 [Java. Intention Actions] Fix invalid handling of statements with missing semicolon in Collapse into loop action
IDEA-357036

GitOrigin-RevId: 12972fe04b845c930f7aed33cdcd324d64d6c0c4
2024-10-23 12:16:29 +00:00
Tagir Valeev
8560c6a5d1 [java-inspections] More preview tests
GitOrigin-RevId: 571a82f66623887c1b5008963df842b2597c58c9
2022-07-27 10:00:31 +00:00
Tagir Valeev
9c6aeba5b4 [java] More tests for preview; minor fixes
GitOrigin-RevId: 7f72c5f68ab821e728eb0d5152f0910f48035046
2022-07-22 11:54:00 +00:00
Tagir Valeev
ebc61af5e8 [java-intention] CollapseIntoLoopAction: disable inside switch and on declarations (IDEA-251600)
GitOrigin-RevId: de00fe6b26f1969f8f9df0ac2d944ec76f402c8c
2020-10-02 04:09:06 +00:00
Tagir Valeev
f3b5023004 EquivalenceChecker: more robust expression sorting
GitOrigin-RevId: 7c2287c2fccd4868e5c17480e9bda49e0317c16f
2020-07-03 10:14:20 +00:00
Tagir Valeev
52cd7af434 CollapseIntoLoopAction: handle comments; handle case if x-th iteration equals to the first one
GitOrigin-RevId: 104dc5f3fec65604aef4288e24df1113227f8ac2
2020-06-17 07:41:40 +03:00
Tagir Valeev
f988f89bbd Avoid suggesting counting loop if loop variable must be effectively final
GitOrigin-RevId: eb15165f5034fa75de9c9af97fb2707a233e9fe5
2020-06-17 07:41:39 +03:00
Tagir Valeev
868aa78cf3 CollapseIntoLoopAction: avoid counting loop for two iterations when step is not +1/-1
GitOrigin-RevId: d8aef85c6d2620a9dd7e9216932388672a049979
2020-06-17 07:41:38 +03:00
Tagir Valeev
7470db33d8 CollapseIntoLoopAction: use tracking equivalence checker
GitOrigin-RevId: e8194d0ed5c4603eacbb0d904232f79f6373e56a
2020-06-17 06:31:00 +03:00
Tagir Valeev
0322598dbc CollapseIntoLoopAction: disable when expression refers to written variable
Also, EquivalenceChecker.getComplexElementDecision fixed

GitOrigin-RevId: 6848a57ddc1cf4992030fff614c246a6316f4807
2020-06-17 06:30:58 +03:00
Tagir Valeev
51cd561f79 CollapseIntoLoopAction: disable when expression is written
GitOrigin-RevId: aa405149d65d0e669bc18f87359f486981c1c899
2020-06-17 06:30:57 +03:00
Tagir Valeev
30b4657109 CollapseIntoLoopAction: support no-selection mode; disable if code can break the outer loop
GitOrigin-RevId: 87c99d17438c8db668e936f379f2edabde692c80
2020-06-11 10:01:42 +03:00
Tagir Valeev
03db4748c0 IDEA-243025 Action to collapse several statements into a loop
GitOrigin-RevId: 5064b5ac2c2ec4390d9d082b7fded96e0c731732
2020-06-10 09:38:24 +03:00