@Nullable
  public static PsiFile copyToDirectory(@NotNull PsiFileSystemItem elementToCopy,
                                        @Nullable String newName,
                                        @NotNull PsiDirectory targetDirectory,
                                        int @Nullable [] choice,
                                        @Nullable @NlsContexts.Command String title) throws IncorrectOperationException, IOException {
    ArrayList<PsiFile> added = new ArrayList<>();
    ArrayList<PsiFile> originals = new ArrayList<>();
    copyToDirectory(Collections.singletonList(elementToCopy), newName, targetDirectory, choice, title, added, originals);
    if (added.isEmpty()) {
      return null;
    }
    DumbService.getInstance(elementToCopy.getProject()).completeJustSubmittedTasks();
    updateAddedFiles(added, originals);
    return added.get(0);
  }
@Nullable
  public static PsiFile copyToDirectory(@NotNull PsiFileSystemItem elementToCopy,
                                        @Nullable String newName,
                                        @NotNull PsiDirectory targetDirectory,
                                        int @Nullable [] choice,
                                        @Nullable @NlsContexts.Command String title)