@NotNull
  private Pair<PsiDirectory, String> getTargetDirectoryAndFileName(@NotNull PsiFile file, FileType fileType, @NotNull Pair<T, T> children) {
    if (ApplicationManager.getApplication().isUnitTestMode()) {
      return Pair.create(ourTargetDirectory, ourTargetFileName);
    }

    ExtractIncludeDialog dialog = createDialog(file.getContainingDirectory(), getExtractExtension(fileType, children.first));
    dialog.show();
    if (dialog.getExitCode() != DialogWrapper.OK_EXIT_CODE) {
      return Pair.create(null, null);
    }
    PsiDirectory targetDirectory = dialog.getTargetDirectory();
    String targetFileName = dialog.getTargetFileName();
    LOG.assertTrue(targetDirectory != null && targetFileName != null);
    return Pair.create(targetDirectory, targetFileName);
  }
@NotNull
  private Pair<PsiDirectory, String> getTargetDirectoryAndFileName(@NotNull PsiFile file, FileType fileType, @NotNull Pair<T, T> children)