boolean (PsiClass aClass, PsiField field) { if (!field.hasModifierProperty(PsiModifier.STATIC)) { return false; } final PsiClass targetClass = PsiUtil.resolveClassInClassTypeOnly(field.getType()); PsiElement toCmp1 = aClass.isPhysical() ? aClass : aClass.getNavigationElement(); PsiElement toCmp2 = targetClass == null || targetClass.isPhysical() ? targetClass : targetClass.getNavigationElement(); return Objects.equals(toCmp1, toCmp2); }