protected ValidationInfo doValidate() {
String message = "Please fill all branch names and prefixes";
if(useNonDefaultConfiguration()) {
if(productionBranchComboBox.getSelectedItem().equals(developmentBranchComboBox.getSelectedItem())) {
return new ValidationInfo("Production and development branch must be distinct branches", developmentBranchComboBox);
}
if (StringUtil.isEmptyOrSpaces(featurePrefixTextField.getText())) {
return new ValidationInfo(message, featurePrefixTextField);
}
if (StringUtil.isEmptyOrSpaces(releasePrefixTextField.getText())) {
return new ValidationInfo(message, releasePrefixTextField);
}
if (StringUtil.isEmptyOrSpaces(hotfixPrefixTextField.getText())) {
return new ValidationInfo(message, hotfixPrefixTextField);
}
if (StringUtil.isEmptyOrSpaces(supportPrefixTextField.getText())) {
return new ValidationInfo(message, supportPrefixTextField);
}
}
return null;
}