void (@NotNull PsiJavaCodeReferenceElement reference) { super.visitReferenceElement(reference); final PsiElement referenceParent = reference.getParent(); if (!(referenceParent instanceof PsiReferenceList referenceList)) { return; } final PsiElement listParent = referenceList.getParent(); if (!(listParent instanceof PsiClass)) { return; } if (referenceList.equals(((PsiClass)listParent).getPermitsList())) { return; } checkReferenceElement(reference); }