@Override
    public boolean equals(PsiClass o1, PsiClass o2) {
      if (o1 == o2) {
        return true;
      }
      if (o1 == null || o2 == null) {
        return false;
      }

      String qname1 = o1.getQualifiedName();
      if (qname1 != null) {
        return qname1.equals(o2.getQualifiedName());
      }
      return o1.getManager().areElementsEquivalent(o1, o2);
    }
@Override
    public boolean equals(PsiClass o1, PsiClass o2)