boolean (PsiReferenceExpression referenceExpression) { final PsiClass parentClass = PsiTreeUtil.getParentOfType(referenceExpression, PsiClass.class); if (parentClass == null) { return false; } final PsiElement target = referenceExpression.resolve(); if (!(target instanceof PsiField superField)) { return false; } final PsiReferenceExpression copy = (PsiReferenceExpression)referenceExpression.copy(); final PsiElement qualifier = copy.getQualifier(); if (qualifier == null) { return false; } qualifier.delete(); // remove super final JavaResolveResult resolveResult = copy.advancedResolve(false); return resolveResult.isValidResult() && superField == resolveResult.getElement(); }