Bug 53473 [EditorMgmt] Leak editor++ on open/close
Build I20040226 1. Create a simple project P; create a file file.txt. 2. Open file.txt; close file.txt Using a profiler, check if there are any instances hanging around. I discover a left-over editor. In addition, I leak many ActionHandler and HandlerSubmissions (equal number). (I appear to leak 1 additional editor and N ActionHandler and HandlerSubmission instances for each pair of open/close operations) (I can also cause this with the java editor)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
* @return a string used for debugging
	 */
	private String toString(CompilationUnit ast) {
		if (ast == null)
			return "null"; 
		
		List types= ast.types();
		if (types != null && types.size() > 0)
			return ((AbstractTypeDeclaration)types.get(0)).getName().getIdentifier();
		else
			return "AST without any type"; 
	}
	private synchronized void cache(CompilationUnit ast, IJavaElement javaElement) {
		
		if (DEBUG && (javaElement != null || ast != null)) 
			System.out.println(DEBUG_PREFIX + "caching AST:" + toString(ast) + " for: " + toString(javaElement)); 
		if (fAST != null)
			disposeAST();
		fAST= ast;
		
		fActiveJavaElement= javaElement;
		
		
		synchronized (fWaitLock) {
			fWaitLock.notifyAll();
		}
	}
	
	public CompilationUnit getAST(IJavaElement je, boolean wait, IProgressMonitor progressMonitor) {
		Assert.isTrue(je != null && (je.getElementType() == IJavaElement.CLASS_FILE || je.getElementType() == IJavaElement.COMPILATION_UNIT));