boolean (@NotNull PsiFile psiFile, @NotNull PsiElement element) { if (!HighlightingFeature.PATTERN_GUARDS_AND_RECORD_PATTERNS.isAvailable(psiFile)) return false; if (!(element instanceof PsiIdentifier)) return false; PsiElement parent = element.getParent(); if (!(parent instanceof PsiJavaCodeReferenceElement)) return false; PsiElement parent1 = parent.getParent(); if (parent1 instanceof PsiCaseLabelElementList) return true; if (!(parent1 instanceof PsiTypeElement)) return false; PsiElement parent2 = parent1.getParent(); return parent2 instanceof PsiInstanceOfExpression; }