ProjectUtils.getFile(projectName, file);
// validate the src file.
}else{
// JavaScriptUtils refreshes the file when getting it.
IJavaScriptUnit src = JavaScriptUtils.getJavaScriptUnit(projectName, file);
IJavaScriptUnit workingCopy = src.getWorkingCopy(null);
ProblemRequestor requestor = new ProblemRequestor();
try{
workingCopy.discardWorkingCopy();
workingCopy.becomeWorkingCopy(requestor, null);
}finally{
workingCopy.discardWorkingCopy();
}
List<IProblem> problems = requestor.getProblems();
ArrayList<Error> errors = new ArrayList<Error>();
String filename = src.getResource().getLocation().toOSString();