Commit Graph

7 Commits

Author SHA1 Message Date
Tagir Valeev
747aec38c9 ConvertSwitchToIfIntention: better comments handling 2018-10-23 15:34:51 +07:00
Tagir Valeev
c09250da45 CommentTracker#replaceAndRestoreComments: try to keep comments after the statement (not move them to the front) 2018-10-08 14:09:24 +07:00
Tagir Valeev
1b4e5c1e39 Merge SwitchStatementWithSingleDefaultInspection into SwitchStatementWithTooFewBranches
Fixes IDEA-199499 Improve "Replace 'switch' with 'if'" action and make it a quick-fix for "Switch has too few branches"
Now default is not counted as branch in SwitchStatementWithTooFewBranches
2018-09-26 17:06:07 +07:00
Tagir Valeev
f859a4c439 Support BreakConverter in ConvertSwitchToIfIntention
Fixes IDEA-141261 'Replace 'switch' with 'if'' intention produces incorrect code if some 'case' clause contains 'break' statement inside 'if'
2018-09-26 11:58:20 +07:00
Anna Kozlova
a6db339c7d convert switch -> if: ignore whitespaces (IDEA-165260) 2018-06-29 20:20:36 +03:00
Anna.Kozlova
a1239e3f1f preserve comments: replace switch with if (IDEA-113518) 2017-12-28 18:09:41 +01:00
Bas Leijdekkers
aa515b08a1 generate "constant".equals(variable) code when converting switch to if (IDEA-157516) 2017-07-24 19:34:16 +02:00