boolean (final @NotNull String title, final @NotNull String message, final @NotNull String rollbackProposal) { final AtomicBoolean ok = new AtomicBoolean(); ApplicationManager.getApplication().invokeAndWait(() -> { StringBuilder description = new StringBuilder(); if (!StringUtil.isEmptyOrSpaces(message)) { description.append(message).append(UIUtil.BR); } description.append(rollbackProposal); ok.set(YES == DialogManager.showOkCancelDialog(myProject, XmlStringUtil.wrapInHtml(description), title, GitBundle.message("branch.ui.handler.rollback"), GitBundle.message("branch.ui.handler.do.not.rollback"), Messages.getErrorIcon())); }); return ok.get(); }