Search in sources :

Example 1 with HgReferenceValidator

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);
}
Also used : HgBranchReferenceValidator(org.zmlx.hg4idea.util.HgBranchReferenceValidator) HgReferenceValidator(org.zmlx.hg4idea.util.HgReferenceValidator)

Example 2 with HgReferenceValidator

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);
}
Also used : HgBranchReferenceValidator(org.zmlx.hg4idea.util.HgBranchReferenceValidator) HgReferenceValidator(org.zmlx.hg4idea.util.HgReferenceValidator)

Aggregations

HgBranchReferenceValidator (org.zmlx.hg4idea.util.HgBranchReferenceValidator)2 HgReferenceValidator (org.zmlx.hg4idea.util.HgReferenceValidator)2