mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
SplitSwitchBranchWithSeveralCaseValuesAction: turn off for misplaced label statements
GitOrigin-RevId: e3a4ab606e214d7fba87cb4d62b95429dabcc446
This commit is contained in:
committed by
intellij-monorepo-bot
parent
52ee08cd92
commit
8a2fe4dd71
@@ -39,6 +39,7 @@ public class SplitSwitchBranchWithSeveralCaseValuesAction extends PsiElementBase
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) {
|
||||
PsiSwitchLabelStatementBase labelStatement = findLabelStatement(editor, element);
|
||||
if (labelStatement == null || labelStatement.getEnclosingSwitchBlock() == null) return false;
|
||||
if (labelStatement instanceof PsiSwitchLabelStatement) {
|
||||
if (isMultiValueCase(labelStatement)) {
|
||||
// mixed syntax "case 1, 2: some code"
|
||||
|
||||
Reference in New Issue
Block a user