void () { Path file = getTemplateFile(); if (Files.exists(file)) { if (Messages.showYesNoDialog(myPanel, LangBundle.message("dialog.message.exists.already.do.you.want.to.replace.it.with.new.one", FileUtilRt.getNameWithoutExtension(file.getFileName().toString())), LangBundle.message("dialog.title.template.already.exists"), Messages.getWarningIcon()) == Messages.NO) { return; } PathKt.delete(file); } super.doOKAction(); }