use of org.eclipse.wst.jsdt.core.WorkingCopyOwner in project webtools.sourceediting by eclipse.
the class JsTranslation method reconcileCompilationUnit.
/* (non-Javadoc)
* @see org.eclipse.wst.jsdt.web.core.internal.java.IJsTranslation#reconcileCompilationUnit()
*/
public void reconcileCompilationUnit() {
// if(true) return;
IJavaScriptUnit cu = getCompilationUnit();
if (fCompilationUnit == null) {
return;
}
if (cu != null) {
try {
synchronized (fLock) {
// clear out old validation messages
WorkingCopyOwner workingCopyOwner = getWorkingCopyOwner();
JsProblemRequestor problemRequestor = (JsProblemRequestor) workingCopyOwner.getProblemRequestor(cu.getWorkingCopy(getProgressMonitor()));
if (problemRequestor != null && problemRequestor.getCollectedProblems() != null)
problemRequestor.getCollectedProblems().clear();
cu.reconcile(IJavaScriptUnit.NO_AST, true, true, getWorkingCopyOwner(), getProgressMonitor());
}
} catch (JavaScriptModelException e) {
Logger.logException(e);
}
}
}
Aggregations