use of org.eclipse.wst.validation.ValidationResults in project liferay-ide by liferay.
the class KaleoUtil method checkWorkflowDefinitionForErrors.
public static String checkWorkflowDefinitionForErrors(IFile workspaceFile) {
String retval = null;
try {
StringBuilder errorMsgs = new StringBuilder();
ValOperation result = ValidationRunner.validate(workspaceFile, ValType.Manual, null, true);
ValidationResultSummary validationResult = result.getResult();
if (validationResult.getSeverityError() == 1) {
ValidationResults results = result.getResults();
for (ValidatorMessage message : results.getMessages()) {
if (message.getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_ERROR) {
errorMsgs.append(message.getAttribute(IMarker.MESSAGE)).append('\n');
}
}
}
retval = errorMsgs.toString();
} catch (Exception e) {
}
return retval;
}
Aggregations