use of org.zmlx.hg4idea.util.HgBranchReferenceValidator in project intellij-community by JetBrains.
the class HgReferenceValidatorTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
HgRepository hgRepository = HgRepositoryImpl.getInstance(myRepository, myProject, myProject);
assertNotNull(hgRepository);
myValidator = new HgBranchReferenceValidator(hgRepository);
cd(myRepository);
hg("branch '" + BRANCH_NAME + "'");
String firstFile = "file.txt";
echo(firstFile, BRANCH_NAME);
hg("commit -m 'createdBranch " + BRANCH_NAME + "' ");
hg("branch '" + UNCOMMITTED_BRANCH + "'");
hgRepository.update();
}
use of org.zmlx.hg4idea.util.HgBranchReferenceValidator 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.HgBranchReferenceValidator 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