org.eclipse.search.ui.text.Match[] matches= Match.convert(fFinder.getOccurrenceMatches(fElement, fDocument)); fResult.addMatches(matches);
ArrayList resultingMatches= new ArrayList(); fFinder.collectOccurrenceMatches(fElement, fDocument, resultingMatches); if (!resultingMatches.isEmpty()) { fResult.addMatches((Match[]) resultingMatches.toArray(new Match[resultingMatches.size()])); }
	public IStatus run(IProgressMonitor monitor) {		if (fFinder != null) {			fFinder.perform();			org.eclipse.search.ui.text.Match[] matches= Match.convert(fFinder.getOccurrenceMatches(fElement, fDocument));			fResult.addMatches(matches);			//Don't leak AST:			fFinder= null;			fDocument= null;			monitor.done();		}		return Status.OK_STATUS;	}