@Override
    public boolean equals(@Nullable PsiElement o1, @Nullable PsiElement o2) {
      if (o1 instanceof PsiNamedElement && o2 instanceof PsiNamedElement) {
        return Objects.equals(((PsiNamedElement)o1).getName(), ((PsiNamedElement)o2).getName());
      }
      return Objects.equals(o1, o2);
    }
@Override
    public boolean equals(@Nullable PsiElement o1, @Nullable PsiElement o2)