void () { HgReferenceValidator validator = new HgBranchReferenceValidator(myRepository); String name = getName(); if (!validator.checkInput(name)) { String message = validator.getErrorText(name); setErrorText(message == null ? HgBundle.message("hg4idea.bookmark.specify.name") : message, myBookmarkName); setOKActionEnabled(false); return; } setErrorText(null); setOKActionEnabled(true); }