private void createFile(@NotNull Project project,
                          @Nullable Editor editor, @NotNull Supplier<? extends @Nullable PsiDirectory> currentDirectory,
                          @NotNull String fileName) throws IncorrectOperationException {
    CreatedFile target;
    try {
      target = WriteCommandAction.writeCommandAction(project)
        .withName(CodeInsightBundle.message(myKey, myNewFileName))
        .compute(() -> {
          PsiDirectory toDirectory = currentDirectory.get();
          if (toDirectory == null) return null;

          return createFileForFix(project, toDirectory, fileName, getFileText());
        });
    }
    catch (IncorrectCreateFilePathException e) {
      if (editor != null) {
        HintManager.getInstance().showErrorHint(editor, e.getLocalizedMessage());
      }
      return;
    }

    if (target != null) {
      openFile(project, target.directory(), target.newFile(), target.text());
    }
  }
private void createFile(@NotNull Project project,
                          @Nullable Editor editor, @NotNull Supplier<? extends @Nullable PsiDirectory> currentDirectory,
                          @NotNull String fileName)