OkCancelDialogBuilder (@NlsContexts.DialogTitle String title, @NlsContexts.DialogMessage String message, @NotNull Project project) { return MessageDialogBuilder.okCancel(title, message) .icon(Messages.getErrorIcon()) .doNotAsk(new DoNotAskOption.Adapter() { @Override public void rememberChoice(boolean isSelected, int exitCode) { PropertiesComponent.getInstance(project).setValue(SUGGEST_ANNOTATION_DEPENDENCY, !isSelected, true); } }) .yesText(JavaBundle.message("button.add.dependency")); }