extension.setProgressMonitor(fProgressMonitor);
extension.setIsActive(true);
}
try {
final ASTProvider astProvider = PHPUiPlugin.getDefault()
.getASTProvider();
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) {