void () { if (!HighlightingFeature.PATTERNS_IN_SWITCH.isAvailable(myPosition)) return; PsiSwitchBlock switchBlock = getSwitchFromLabelPosition(myPosition); if (switchBlock == null) return; final PsiType selectorType = getSelectorType(switchBlock); if (selectorType == null || selectorType instanceof PsiPrimitiveType) return; final TailType caseRuleTail = JavaTailTypes.forSwitchLabel(switchBlock); Set<String> containedLabels = getSwitchCoveredLabels(switchBlock, myPosition); if (!containedLabels.contains(PsiKeyword.NULL)) { addKeyword(createCaseRule(PsiKeyword.NULL, caseRuleTail, switchBlock)); if (!containedLabels.contains(PsiKeyword.DEFAULT)) { addKeyword(createCaseRule(PsiKeyword.NULL + ", " + PsiKeyword.DEFAULT, caseRuleTail, switchBlock)); } } addSealedHierarchyCases(selectorType, containedLabels); }