List<IProblem> errorList = new ArrayList<IProblem>();
if (result.hasProblems()) {
IProblem[] problems = result.getProblems();
for (int i = 0; i < problems.length; i++) {
StringBuilder sb = new StringBuilder();
IProblem problem = problems[i];
if (ignoreWarning && problem.isWarning()) {
continue;
}
if (problem.isError()) {
sb.append("E").append(FIELD_SEPERATOR);
} else {
sb.append("W").append(FIELD_SEPERATOR);
}
String filename=String.valueOf(problem.getOriginatingFileName());
sb.append(filename).append(FIELD_SEPERATOR);
sb.append(problem.getSourceLineNumber()).append(FIELD_SEPERATOR);
sb.append(problem.getMessage()).append(FIELD_SEPERATOR);
sb.append(problem.getSourceStart()).append(FIELD_SEPERATOR);
sb.append(problem.getSourceEnd()).append("\n");
compileResult.addProblemInfo(sb.toString());
if (problem.isError()) {
errorList.add(problem);
}
}
}
compileResult.setError(true);