boolean (PsiJavaCodeReferenceElement element, PsiJavaCodeReferenceElement otherElement, @NotNull PsiClass aClass) { final PsiManager manager = aClass.getManager(); return !manager.areElementsEquivalent(otherElement, element) && manager.areElementsEquivalent(otherElement.resolve(), aClass); }