fActiveJavaElement= javaElement;
	private synchronized void cache(CompilationUnit ast, IJavaElement javaElement) {				if (DEBUG && (javaElement != null || ast != null)) // don't report call from disposeAST()			System.out.println(DEBUG_PREFIX + "caching AST:" + toString(ast) + " for: " + toString(javaElement)); //$NON-NLS-1$ //$NON-NLS-2$		boolean lastJavaEditorClosed= false;		if (fActiveEditor == null) {			IEditorPart editors[]= JavaPlugin.getInstanciatedEditors();			int i= 0, length= editors.length;			lastJavaEditorClosed= true;			while (lastJavaEditorClosed && i < length)				lastJavaEditorClosed= !isJavaEditor(editors[i++].getEditorSite().getId());		}					if (ast == null && !lastJavaEditorClosed) {			if (fPreviousJavaElement != null && fPreviousJavaElement.equals(javaElement)) {				ast= fPreviousAST;				fPreviousAST= null;				fPreviousJavaElement= null;			} else if (fPreviousAST == null && fAST != null) {				fPreviousJavaElement= fActiveJavaElement;				fPreviousAST= fAST;				fAST= null;			}		} else {			fPreviousAST= null;			fPreviousJavaElement= null;		}				if (fAST != null && fAST != ast)			disposeAST();		fAST= ast;				fActiveJavaElement= javaElement;				// Signal AST change		synchronized (fWaitLock) {			fWaitLock.notifyAll();		}				Assert.isTrue(fAST == null || fPreviousAST == null);		Assert.isTrue(!lastJavaEditorClosed || fPreviousAST == null);	}