boolean () { Ref<Boolean> rebaseAnyway = Ref.create(false); String message = new HtmlBuilder() .append(GitBundle.message("rebase.confirmation.dialog.published.commits.message.first")).br() .append(GitBundle.message("rebase.confirmation.dialog.published.commits.message.second")) .wrapWith(HtmlChunk.html()) .toString(); ApplicationManager.getApplication().invokeAndWait(() -> { int answer = DialogManager.showMessage( message, GitBundle.message("rebase.confirmation.dialog.published.commits.title"), new String[]{ GitBundle.message("rebase.confirmation.dialog.published.commits.button.rebase.text"), GitBundle.message("rebase.confirmation.dialog.published.commits.button.cancel.text") }, 1, 1, getWarningIcon(), null ); rebaseAnyway.set(answer == 0); }); return rebaseAnyway.get(); }