synchronized (unit) {
unit.reconcile(true, null, fProgressMonitor);
}
// read DOM AST from provider if avaiable
Program createdAST = astProvider.getAST(unit,
SharedASTProvider.WAIT_NO, fProgressMonitor);
if (astProvider.isActive(unit) && createdAST != null) {
return createdAST;
}
if (initialReconcile || astProvider.isActive(unit)) {
PHPVersion phpVersion = ProjectOptions.getPhpVersion(unit
.getScriptProject().getProject());
ASTParser newParser = ASTParser.newParser(phpVersion, unit);
createdAST = newParser.createAST(null);
if (createdAST != null && document != null) {
createdAST.setSourceModule(unit);
createdAST.setSourceRange(0, document.getLength());
createdAST.setLineEndTable(Util.lineEndTable(document));
}
return createdAST;
}
} catch (OperationCanceledException ex) {