IJavaScriptUnit workingCopy = src.getWorkingCopy(null);
ProblemRequestor requestor = new ProblemRequestor();
try{
workingCopy.discardWorkingCopy();
workingCopy.becomeWorkingCopy(requestor, null);
}finally{
workingCopy.discardWorkingCopy();
}
List<IProblem> problems = requestor.getProblems();