return errorMessage;
}
@NbBundle.Messages("FuelPhpModuleCustomizerExtender.error.source.invalid=Can't find source directory. Project might be broken.")
void validate() {
FuelPhpCustomizerPanel customizerPanel = getPanel();
if (!customizerPanel.isFuelEnabled()) {
isValid = true;
errorMessage = null;
return;
}
// get source directory
FileObject sourceDirectory = phpModule.getSourceDirectory();
if (sourceDirectory == null) {
// broken project
isValid = false;
errorMessage = Bundle.FuelPhpModuleCustomizerExtender_error_source_invalid();
return;
}
FuelPhpCustomizerValidator validator = new FuelPhpCustomizerValidator()
.validateOilPath(sourceDirectory)
.validateFuelDirectoryName(sourceDirectory, customizerPanel.getFuelName());
ValidationResult result = validator.getResult();
if (result.hasWarnings()) {
isValid = false;
errorMessage = result.getWarnings().get(0).getMessage();
return;