use of org.zmlx.hg4idea.util.HgReferenceValidator in project intellij-community by JetBrains.
the class HgTagDialog method validateFields.
private void validateFields() {
HgReferenceValidator validator = new HgBranchReferenceValidator(hgRepositorySelectorComponent.getRepository());
String name = getTagName();
if (!validator.checkInput(name)) {
String message = validator.getErrorText(name);
setErrorText(message == null ? "You have to specify tag name." : message, tagTxt);
setOKActionEnabled(false);
return;
}
setErrorText(null);
setOKActionEnabled(true);
}
use of org.zmlx.hg4idea.util.HgReferenceValidator in project intellij-community by JetBrains.
the class HgBookmarkDialog method validateFields.
private void validateFields() {
HgReferenceValidator validator = new HgBranchReferenceValidator(myRepository);
String name = getName();
if (!validator.checkInput(name)) {
String message = validator.getErrorText(name);
setErrorText(message == null ? "You have to specify bookmark name." : message, myBookmarkName);
setOKActionEnabled(false);
return;
}
setErrorText(null);
setOKActionEnabled(true);
}
Aggregations