boolean (@NlsContexts.DialogMessage String validation, boolean askSaveUnfinished) { if (StringUtil.isEmpty(validation)) { validation = IdeBundle.message("dialog.message.communication.error"); } if (askSaveUnfinished) { if (Messages .showOkCancelDialog(validation, IdeBundle.message("dialog.title.can.t.create.0.sdk", getSdkFactory().sdkName()), IdeBundle.message("button.save.anyway"), IdeBundle.message("button.continue.editing"), Messages.getWarningIcon()) == Messages.OK) { return true; } } else { Messages.showErrorDialog(validation, IdeBundle.message("dialog.title.can.t.create.0.sdk", getSdkFactory().sdkName())); } return false; }