Bug 65378 FindOccurencesCUEngine should use ASTProvider
RC1 FindOccurrencesEngine should get the AST from the ASTProvider so it can profit if the AST is already cached (2 occurences) e.g. JaavPlugin.getDefault().getASTProvider().getAST(cu)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindOccurrencesEngine.java
}
	
	protected FindOccurrencesEngine(IOccurrencesFinder finder) {
		fFinder= finder;
	}
	
	public static FindOccurrencesEngine create(IJavaElement root, IOccurrencesFinder finder) {
		if (root == null || finder == null)
			return null;
		
		ICompilationUnit unit= (ICompilationUnit)root.getAncestor(IJavaElement.COMPILATION_UNIT);
		if (unit != null)
			return new FindOccurencesCUEngine(unit, finder);
		IClassFile cf= (IClassFile)root.getAncestor(IJavaElement.CLASS_FILE);
		if (cf != null)
			return new FindOccurencesClassFileEngine(cf, finder);
		return null;
	}
	protected abstract CompilationUnit createAST();
	
	protected abstract IJavaElement getInput();
	
	protected abstract ISourceReference getSourceReference();
	
	
	protected abstract IResource getMarkerOwner() throws JavaModelException;
	
	
	protected abstract void addSpecialAttributes(Map attributes) throws JavaModelException;