boolean (@NotNull PsiSwitchLabelStatementBase rule) { PsiCaseLabelElementList labelElementList = rule.getCaseLabelElementList(); if (labelElementList == null) return false; PsiCaseLabelElement[] elements = labelElementList.getElements(); return !ContainerUtil.exists(elements, element -> element instanceof PsiPattern && (!HighlightingFeature.UNNAMED_PATTERNS_AND_VARIABLES.isAvailable(element) || JavaPsiPatternUtil.containsNamedPatternVariable(element)) || element instanceof PsiExpression expr && ExpressionUtils.isNullLiteral(expr)); }