public static ISourceLocation makeSourceLocation(ICompilationUnit unit, IProblem problem, IProgressListener progressListener) {
int line = problem.getSourceLineNumber();
File file = new File(new String(problem.getOriginatingFileName()));
// cheat here...269912 - don't build the context if under IDE control
if (progressListener!=null) {
return new SourceLocation(file, line, line, 0, null);
} else {
String context = makeLocationContext(unit, problem);
// XXX 0 column is wrong but recoverable from makeLocationContext
return new SourceLocation(file, line, line, 0, context);
}
}