void (@NotNull AnActionEvent e) { Project project = e.getProject(); boolean doNotShowDialog = PropertiesComponent.getInstance().getBoolean(CONFIRMATION_DIALOG); if (!doNotShowDialog) { String title = IdeBundle.message("collect.logs.sensitive.title"); String message = IdeBundle.message("collect.logs.sensitive.text"); boolean confirmed = MessageDialogBuilder.okCancel(title, message) .yesText(ActionsBundle.message("action.RevealIn.name.other", RevealFileAction.getFileManagerName())) .noText(CommonBundle.getCancelButtonText()) .icon(Messages.getWarningIcon()) .doNotAsk(new DoNotAskOption.Adapter() { @Override public void rememberChoice(boolean selected, int exitCode) { PropertiesComponent.getInstance().setValue(CONFIRMATION_DIALOG, selected); } }) .ask(project); if (!confirmed) { return; } } ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> { try { Path logs = LogsPacker.packLogs(project); if (RevealFileAction.isSupported()) { RevealFileAction.openFile(logs); } else { new Notification(NOTIFICATION_GROUP, IdeBundle.message("collect.logs.notification.success", logs), NotificationType.INFORMATION).notify(project); } } catch (IOException x) { Logger.getInstance(getClass()).warn(x); String message = IdeBundle.message("collect.logs.notification.error", IoErrorText.message(x)); new Notification(NOTIFICATION_GROUP, message, NotificationType.ERROR).notify(project); } }, IdeBundle.message("collect.logs.progress.title"), true, project); }