private static @Nullable String showUnstructuredEditorAndWait(@NotNull Project project,
                                                                @Nullable VirtualFile root,
                                                                @NotNull @NlsSafe String initialText,
                                                                @NotNull @NlsContexts.DialogTitle String dialogTitle,
                                                                @NotNull @NlsContexts.Button String okButtonText) {
    Ref<String> newText = Ref.create();
    ApplicationManager.getApplication().invokeAndWait(() -> {
      GitUnstructuredEditor editor = new GitUnstructuredEditor(project, root, initialText, dialogTitle, okButtonText);
      DialogManager.show(editor);
      if (editor.isOK()) {
        newText.set(editor.getText());
      }
    });
    return newText.get();
  }
private static @Nullable String showUnstructuredEditorAndWait(@NotNull Project project,
                                                                @Nullable VirtualFile root,
                                                                @NotNull @NlsSafe String initialText,
                                                                @NotNull @NlsContexts.DialogTitle String dialogTitle,
                                                                @NotNull @NlsContexts.Button String okButtonText)