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
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.internal.corext.util.WorkingCopyUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.search.ui.ISearchResultView;
import org.eclipse.search.ui.NewSearchUI;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.ui.ide.IDE;
public abstract class FindOccurrencesEngine {
	
	
	private boolean USE_NEW_SEARCH= true;
	
	private IOccurrencesFinder fFinder;
	
	private static class FindOccurencesClassFileEngine extends FindOccurrencesEngine {