use of org.eclipse.ui.part.PageSwitcher in project eclipse.platform.text by eclipse.
the class SearchView method initializePageSwitcher.
private void initializePageSwitcher() {
new PageSwitcher(this) {
@Override
public void activatePage(Object page) {
ISearchResult searchResult = ((ISearchQuery) page).getSearchResult();
InternalSearchUI.getInstance().showSearchResult(SearchView.this, searchResult, false);
}
@Override
public ImageDescriptor getImageDescriptor(Object page) {
ISearchResult searchResult = ((ISearchQuery) page).getSearchResult();
return searchResult.getImageDescriptor();
}
@Override
public String getName(Object page) {
ISearchResult searchResult = ((ISearchQuery) page).getSearchResult();
return searchResult.getLabel();
}
@Override
public Object[] getPages() {
return NewSearchUI.getQueries();
}
};
}
Aggregations