private void checkRowValue(StringValue operation, String columnName, StringValue columnValue, ValueNecessity columnNecessity)
throws SyntaxNodeException {
if (columnNecessity == ValueNecessity.REQUIRED && columnValue.isEmpty()) {
IOpenSourceCodeModule source = columnValue.asSourceCodeModule();
if (source.getUri() == null) {
String errMsg = String.format("%s is required for operation \"%s\"!", columnName, operation);
throw SyntaxNodeExceptionUtils.createError(errMsg, operation.asSourceCodeModule());
} else {
String errMsg = String.format("Operation must have value in %s!", columnName);
throw SyntaxNodeExceptionUtils.createError(errMsg, source);
}
}
if (columnNecessity == ValueNecessity.PROHIBITED && !columnValue.isEmpty()) {
String errMsg = String.format("Operation must not have value in %s!", columnName);
throw SyntaxNodeExceptionUtils.createError(errMsg, columnValue.asSourceCodeModule());
}
}