public abstract class AbstractSearchResultPage
extends org.eclipse.search.ui.text.AbstractTextSearchViewPage
AbstractTextSearchViewPage that extends the
base implementation with a bit more functionality. Uses a SearchEditorOpener to show matches in an editor. Saves and restores
the element limit as part of the page state. Changes in the search result
are handled in the elementsChanged() and clear()
methods by delegating to an ISearchContentProvider.| Constructor and Description |
|---|
AbstractSearchResultPage()
Creates a new search page with the default layout flags.
|
AbstractSearchResultPage(int supportedLayouts)
Creates a new search page with the given layout flags.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clear() |
protected SearchEditorOpener |
createEditorOpener()
Creates the editor opener to be used in this page.
|
protected org.eclipse.jface.action.IAction |
createSearchPreferencesAction()
Creates the action that opens the search preferences dialog.
|
protected void |
elementsChanged(java.lang.Object[] objects) |
protected org.eclipse.jface.viewers.IStructuredContentProvider |
getContentProvider()
Returns the content provider currently used in this page.
|
protected int |
getDisplayedMatchCount()
Returns the number of matches that are currently displayed for the
viewer elements.
|
protected SearchEditorOpener |
getEditorOpener()
Returns the editor opener currently used in this page.
|
java.lang.String |
getLabel() |
protected org.eclipse.jface.viewers.StructuredViewer |
getViewer() |
void |
init(org.eclipse.ui.part.IPageSite pageSite) |
void |
restoreState(org.eclipse.ui.IMemento memento) |
void |
saveState(org.eclipse.ui.IMemento memento) |
protected void |
showMatch(org.eclipse.search.ui.text.Match match,
int currentOffset,
int currentLength,
boolean activate) |
canRemoveMatchesWith, configureTableViewer, configureTreeViewer, createControl, createTableViewer, createTreeViewer, dispose, evaluateChangedElements, fillContextMenu, fillToolbar, getControl, getCurrentMatch, getCurrentMatchLocation, getDisplayedMatchCount, getDisplayedMatches, getElementLimit, getID, getInput, getLayout, getSettings, getUIState, getViewPart, gotoNextMatch, gotoPreviousMatch, handleOpen, handleSearchResultChanged, internalRemoveSelected, isLayoutSupported, open, openAndSelect, postEnsureSelection, setElementLimit, setFocus, setID, setInput, setLayout, setViewPart, showMatchpublic AbstractSearchResultPage(int supportedLayouts)
supportedLayouts - flags determining which layout options
this page supports. Must not be 0AbstractTextSearchViewPage.FLAG_LAYOUT_FLAT,
AbstractTextSearchViewPage.FLAG_LAYOUT_TREEpublic AbstractSearchResultPage()
public void init(org.eclipse.ui.part.IPageSite pageSite)
init in interface org.eclipse.ui.part.IPageBookViewPageinit in class org.eclipse.search.ui.text.AbstractTextSearchViewPagepublic void restoreState(org.eclipse.ui.IMemento memento)
restoreState in interface org.eclipse.search.ui.ISearchResultPagerestoreState in class org.eclipse.search.ui.text.AbstractTextSearchViewPagepublic void saveState(org.eclipse.ui.IMemento memento)
saveState in interface org.eclipse.search.ui.ISearchResultPagesaveState in class org.eclipse.search.ui.text.AbstractTextSearchViewPagepublic java.lang.String getLabel()
getLabel in interface org.eclipse.search.ui.ISearchResultPagegetLabel in class org.eclipse.search.ui.text.AbstractTextSearchViewPageprotected void showMatch(org.eclipse.search.ui.text.Match match,
int currentOffset,
int currentLength,
boolean activate)
throws org.eclipse.ui.PartInitException
showMatch in class org.eclipse.search.ui.text.AbstractTextSearchViewPageorg.eclipse.ui.PartInitExceptionprotected void elementsChanged(java.lang.Object[] objects)
elementsChanged in class org.eclipse.search.ui.text.AbstractTextSearchViewPageprotected void clear()
clear in class org.eclipse.search.ui.text.AbstractTextSearchViewPageprotected org.eclipse.jface.viewers.StructuredViewer getViewer()
getViewer in class org.eclipse.search.ui.text.AbstractTextSearchViewPageprotected final org.eclipse.jface.viewers.IStructuredContentProvider getContentProvider()
null
if this page does not yet have a content providerprotected final SearchEditorOpener getEditorOpener()
null if none
has been created yetprotected SearchEditorOpener createEditorOpener()
protected org.eclipse.jface.action.IAction createSearchPreferencesAction()
null, in which case no "Preferences..." action will be
added to the view menu.
Default implementation returns a new OpenSearchPreferencesAction.
null
if this page should have no "Preferences..." actionprotected int getDisplayedMatchCount()
AbstractTextSearchViewPage.getDisplayedMatchCount(Object)Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0