Commit Graph

7 Commits

Author SHA1 Message Date
Alexandr Suhinin 5a1a3450b4 IDEA-274822 [convert switch to if] fix: avoid calls to PsiSwitchLabelStatementBase.isDefaultCase
GitOrigin-RevId: e72998a2f37c21d4c78096da3c45d56f1d7fd2aa
2021-08-03 06:43:20 +00:00
Tagir Valeev c68df6edc2 ConvertSwitchToIfIntention: preserve comments from expression when only default branch is present 2019-01-10 17:24:20 +07:00
Tagir Valeev 0835bd0976 ConvertSwitchToIfIntention: fix processing of empty blocks
IDEA-205137 `Replace Switch with If` produce exceptions
IDEA-205122 Unwrap switch fails with exception
2019-01-10 12:40:04 +07:00
Tagir Valeev 7e9e5dd691 IDEA-203845 com.intellij.util.IncorrectOperationException: Incorrect statement 'else 2018-12-08 17:14:46 +07:00
Tagir Valeev 53b426dfae SwitchStatementWithTooFewBranches: warn on switch expression; provide fix in simple case (single default) 2018-12-07 12:53:08 +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 9530731ea5 IDEA-196805 Warn about switch statement with single 'default' 2018-09-25 14:19:43 +07:00