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
}
		
		private boolean isJavaEditor(IWorkbenchPartReference ref) {
			if (ref == null)
				return false;
			
			String id= ref.getId();
			return JavaUI.ID_CF_EDITOR.equals(id) || JavaUI.ID_CU_EDITOR.equals(id); 
		}
	}
	
	private static final String AST_DISPOSED= "org.eclipse.jdt.internal.ui.astDisposed"; 
	private static final String DEBUG_PREFIX= "ASTProvider > "; 
	
	
	private IJavaElement fReconcilingJavaElement;
	private IJavaElement fActiveJavaElement;
	private CompilationUnit fAST;
	private ActivationListener fActivationListener;
	private Object fReconcileLock= new Object();
	private Object fWaitLock= new Object();
	private boolean fIsReconciling;
	private IWorkbench fWorkbench;
	private IWorkbenchPart fActiveEditor;
	
	/**
	 * Creates a new AST provider. 
	 */
	public ASTProvider() {
		install();