} catch (IllegalStateException ex) { root[0]= null;
	private CompilationUnit createAST(IJavaElement je, final IProgressMonitor progressMonitor) {		final ASTParser parser = ASTParser.newParser(SHARED_AST_LEVEL);		parser.setResolveBindings(true);		parser.setStatementsRecovery(SHARED_AST_STATEMENT_RECOVERY);		if (je.getElementType() == IJavaElement.COMPILATION_UNIT)			parser.setSource((ICompilationUnit)je);		else if (je.getElementType() == IJavaElement.CLASS_FILE)			parser.setSource((IClassFile)je);		if (progressMonitor != null && progressMonitor.isCanceled())			return null;		final CompilationUnit root[]= new CompilationUnit[1]; 				SafeRunner.run(new ISafeRunnable() {			public void run() {				try {					root[0]= (CompilationUnit)parser.createAST(progressMonitor);				} catch (OperationCanceledException ex) {					root[0]= null;				} catch (IllegalStateException ex) {					root[0]= null;				}			}			public void handleException(Throwable ex) {				IStatus status= new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IStatus.OK, "Error in JDT Core during AST creation", ex);  //$NON-NLS-1$				JavaPlugin.getDefault().getLog().log(status);			}		});				// mark as unmodifiable		if (root[0] != null)			ASTNodes.setFlagsToAST(root[0], ASTNode.PROTECT);				return root[0];	}