IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.proceedWithAllProblems();
CompilerOptions options = getCompilerOptions();
CompilerRequestor requestor = new CompilerRequestor();
IProblemFactory problemFactory = new DefaultProblemFactory(Locale.getDefault());
Compiler compiler = new Compiler(env, policy, options, requestor, problemFactory);
compiler.compile(new ICompilationUnit[] { new CompilationUnit(source) });
if (requestor.hasErrors()) {
String sourceCode = source.getSourceCode();
String[] sourceCodeLines = sourceCode.split("(\r\n|\r|\n)", -1);
StringBuilder sb = new StringBuilder();