@Override
  public @NotNull PsiElement findSameElementInCopy(@NotNull PsiFile copy) {
    PsiElement parent = getParent();
    if (parent instanceof PsiClassOwner && copy instanceof PsiClassOwner) {
      PsiClass[] copyClasses = ((PsiClassOwner)copy).getClasses();
      for (PsiClass copyClass : copyClasses) {
        if (copyClass.isEquivalentTo(this)) {
          return copyClass;
        }
      }
    }
    return SyntheticElement.super.findSameElementInCopy(copy);
  }
@Override
  public @NotNull PsiElement findSameElementInCopy(@NotNull PsiFile copy)