return objects;
}
}
else if ( parent instanceof ISearch )
{
ISearch search = ( ISearch ) parent;
if ( search.getSearchResults() == null )
{
new StudioBrowserJob( new SearchRunnable( new ISearch[]
{ search } ) ).execute();
return new String[]
{ "Performing Search..." };
}
else if ( search.getSearchResults().length == 0 )
{
return new String[]
{ "No Results" };
}
else if ( search.getSearchResults().length <= preferences.getFoldingSize() || !preferences.isUseFolding() )
{
ISearchResult[] results = search.getSearchResults();
return results;
}
else
{
BrowserSearchResultPage[] srPages = null;
if ( !searchToSearchResultPagesMap.containsKey( search ) )
{
srPages = getSearchResultPages( search, 0, search.getSearchResults().length - 1 );
searchToSearchResultPagesMap.put( search, srPages );
}
else
{
srPages = searchToSearchResultPagesMap.get( search );
if ( search.getSearchResults().length - 1 != srPages[srPages.length - 1].getLast() )
{
srPages = getSearchResultPages( search, 0, search.getSearchResults().length - 1 );
searchToSearchResultPagesMap.put( search, srPages );
}
}
return srPages;
}