void (@NotNull GrCodeReferenceElement refElement) { super.visitCodeReferenceElement(refElement); if (myHaveInstanceRefs) return; final PsiElement resolvedElement = refElement.resolve(); if (!(resolvedElement instanceof PsiClass aClass)) return; final PsiElement scope = aClass.getScope(); if (!(scope instanceof PsiClass)) return; if (!aClass.hasModifierProperty(PsiModifier.STATIC)) { registerInstanceRef(); } }