SwitchBlockHighlightingModel (@NotNull LanguageLevel languageLevel, @NotNull PsiSwitchBlock switchBlock, @NotNull PsiFile psiFile) { PsiExpression selector = switchBlock.getExpression(); if (selector == null) return null; PsiType selectorType = selector.getType(); if (selectorType == null) return null; if (HighlightingFeature.PATTERNS_IN_SWITCH.isSufficient(languageLevel)) { return new PatternsInSwitchBlockHighlightingModel(languageLevel, switchBlock, psiFile); } return new SwitchBlockHighlightingModel(languageLevel, switchBlock, psiFile); }