Iterator<CompilerError> errors =
vm.getCompilerErrors().iterator(file.getAbsolutePath());
Document document = result.getSnapshot().getSource().getDocument(false);
List<ErrorDescription> nbErrors = new ArrayList<ErrorDescription>();
while(errors.hasNext()) {
ErrorDescription errorDescription;
CompilerError error = errors.next();
errorDescription = ErrorDescriptionFactory.createErrorDescription(
Severity.ERROR, error.getError(),
document,
error.getLineNumber());