} public void handleException(Throwable ex) { IStatus status= new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IStatus.OK, "Error in JDT Core during reconcile", ex); JavaPlugin.getDefault().getLog().log(status); } });  if (ast[0] != null) {  ASTNodes.setFlagsToAST(ast[0], ASTNode.PROTECT);
} else unit.reconcile(ICompilationUnit.NO_AST, true, null, fProgressMonitor);
	private void reconcile(boolean initialReconcile) {		final CompilationUnit[] ast= new CompilationUnit[1];		try {			final ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput());			if (unit != null) {				try {					/* fix for missing cancel flag communication */					IProblemRequestorExtension extension= getProblemRequestorExtension();					if (extension != null) {						extension.setProgressMonitor(fProgressMonitor);						extension.setIsActive(true);					}					try {						boolean isASTNeeded= initialReconcile || JavaPlugin.getDefault().getASTProvider().isActive(unit);						// reconcile						synchronized (unit) {							if (fIsJavaReconcilingListener && isASTNeeded) {																																Platform.run(new ISafeRunnable() {									public void run() {										try {											ast[0]= unit.reconcile(ASTProvider.AST_LEVEL, true, null, fProgressMonitor);										} catch (JavaModelException ex) {											handleException(ex);										}									}									public void handleException(Throwable ex) {										IStatus status= new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IStatus.OK, "Error in JDT Core during reconcile", ex);  //$NON-NLS-1$										JavaPlugin.getDefault().getLog().log(status);									}								});																if (ast[0] != null) {									// mark as unmodifiable									ASTNodes.setFlagsToAST(ast[0], ASTNode.PROTECT);								}							} else								unit.reconcile(ICompilationUnit.NO_AST, true, null, fProgressMonitor);						}					} catch (OperationCanceledException ex) {						Assert.isTrue(fProgressMonitor == null || fProgressMonitor.isCanceled());						ast[0]= null;					} finally {						/* fix for missing cancel flag communication */						if (extension != null) {							extension.setProgressMonitor(null);							extension.setIsActive(false);						}					}				} catch (JavaModelException x) {					// swallow exception				}			}		} finally {			// Always notify listeners, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=55969 for the final solution			try {				if (fIsJavaReconcilingListener) {					IProgressMonitor pm= fProgressMonitor;					if (pm == null)						pm= new NullProgressMonitor();					fJavaReconcilingListener.reconciled(ast[0], !fNotify, pm);				}			} finally {				fNotify= true;			}		}	}