private List doSearchForReferences(String ref, IWorkingCopy[] workingCopies) throws JavaModelException { SearchEngine engine= new SearchEngine(workingCopies); if (BUG_43300 && workingCopies.length == 0) { engine= new SearchEngine();
private List doSearchForReferences(String ref, ICompilationUnit wcopy) throws JavaModelException { IWorkingCopy[] allWorkingCopies; if (wcopy == null) { if (JavaPlugin.USE_WORKING_COPY_OWNERS) { allWorkingCopies= new ICompilationUnit[0]; } else { allWorkingCopies= JavaUI.getSharedWorkingCopies(); }  } else { if (JavaPlugin.USE_WORKING_COPY_OWNERS) { allWorkingCopies= new ICompilationUnit[] { wcopy }; } else { IWorkingCopy[] copies= JavaUI.getSharedWorkingCopies(); allWorkingCopies= new ICompilationUnit[copies.length + 1]; System.arraycopy(copies, 0, allWorkingCopies, 0, copies.length); allWorkingCopies[copies.length]= wcopy; }
	private List doSearchForReferences(String ref, IWorkingCopy[] workingCopies) throws JavaModelException {		SearchEngine engine= new SearchEngine(workingCopies);		if (BUG_43300 && workingCopies.length == 0) {			engine= new SearchEngine();		}				IJavaSearchScope scope= SearchEngine.createWorkspaceScope();		SearchResultCollector collector= new SearchResultCollector(null);		engine.search(ResourcesPlugin.getWorkspace(), ref, IJavaSearchConstants.TYPE, IJavaSearchConstants.REFERENCES, scope, collector);		return collector.getResults();	}