org.eclipse.xtext.ui.editor.findrefs
Class ReferenceSearchViewPage

java.lang.Object
  extended by org.eclipse.ui.part.Page
      extended by org.eclipse.xtext.ui.editor.findrefs.ReferenceSearchViewPage
All Implemented Interfaces:
org.eclipse.search.ui.ISearchResultPage, org.eclipse.ui.part.IPage, org.eclipse.ui.part.IPageBookViewPage

public class ReferenceSearchViewPage
extends org.eclipse.ui.part.Page
implements org.eclipse.search.ui.ISearchResultPage


Constructor Summary
ReferenceSearchViewPage()
           
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
          Creates the SWT control for this page under the given parent control.
protected  org.eclipse.ui.OpenAndLinkWithEditorHelper createOpenAndLinkWithEditorHandler()
           
protected  org.eclipse.search.ui.IQueryListener createQueryListener()
           
 void dispose()
          The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed).
protected  void fillToolbar(org.eclipse.jface.action.IToolBarManager tbm)
           
 org.eclipse.swt.widgets.Control getControl()
          The Page implementation of this IPage method returns null.
 java.lang.String getID()
          Returns the id set via setID.
 java.lang.String getLabel()
          Returns a user readable label for this search result page.
 java.lang.Object getUIState()
          Returns an object representing the current user interface state of the page.
 org.eclipse.jface.viewers.TreeViewer getViewer()
           
protected  void handleOpen(org.eclipse.jface.viewers.OpenEvent openEvent)
           
 void init(org.eclipse.ui.part.IPageSite pageSite)
          The Page implementation of this IPageBookViewPage method stores a reference to the supplied site (the site which contains this page).
 void restoreState(org.eclipse.ui.IMemento memento)
          Restores the page state.
 void saveState(org.eclipse.ui.IMemento memento)
          Saves the page state in a memento.
 void setFocus()
          The Page implementation of this IPage method does nothing.
 void setID(java.lang.String id)
          Sets the id for this page.
 void setInput(org.eclipse.search.ui.ISearchResult newSearchResult, java.lang.Object uiState)
          Sets the search result to be shown in this search results page.
 void setViewPart(org.eclipse.search.ui.ISearchResultViewPart part)
          Sets the search view this search results page is shown in.
protected  void showBusyLabel(boolean shouldShowBusy)
           
 
Methods inherited from class org.eclipse.ui.part.Page
getSite, makeContributions, setActionBars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.part.IPageBookViewPage
getSite
 
Methods inherited from interface org.eclipse.ui.part.IPage
setActionBars
 

Constructor Detail

ReferenceSearchViewPage

public ReferenceSearchViewPage()
Method Detail

getID

public java.lang.String getID()
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Returns the id set via setID.

Specified by:
getID in interface org.eclipse.search.ui.ISearchResultPage
Returns:
the id of this page

setID

public void setID(java.lang.String id)
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Sets the id for this page. This method will be called before any other initialization is done.

Specified by:
setID in interface org.eclipse.search.ui.ISearchResultPage
Parameters:
id - the id for this page

getLabel

public java.lang.String getLabel()
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Returns a user readable label for this search result page. The label will be used to describe the contents for the page to the user (for example it will be displayed in the search view title bar). To take an example from file search, a label might read like this: 'test' - 896 matches in workspace.

Specified by:
getLabel in interface org.eclipse.search.ui.ISearchResultPage
Returns:
the user readable label for this search result page

getUIState

public java.lang.Object getUIState()
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Returns an object representing the current user interface state of the page. For example, the current selection in a viewer. The UI state will be later passed into the setInput() method when the currently shown ISearchResult is shown again.

Specified by:
getUIState in interface org.eclipse.search.ui.ISearchResultPage
Returns:
an object representing the UI state of this page

restoreState

public void restoreState(org.eclipse.ui.IMemento memento)
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Restores the page state. Note that this applies only to state that is saved across sessions.

Specified by:
restoreState in interface org.eclipse.search.ui.ISearchResultPage
Parameters:
memento - a memento to restore the page state from or null if no previous state was saved
See Also:
ISearchResultPage.setInput(ISearchResult, Object)

saveState

public void saveState(org.eclipse.ui.IMemento memento)
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Saves the page state in a memento. Note that this applies to state that should persist across sessions.

Specified by:
saveState in interface org.eclipse.search.ui.ISearchResultPage
Parameters:
memento - a memento to receive the object state
See Also:
ISearchResultPage.getUIState()

init

public void init(org.eclipse.ui.part.IPageSite pageSite)
Description copied from class: org.eclipse.ui.part.Page
The Page implementation of this IPageBookViewPage method stores a reference to the supplied site (the site which contains this page).

Subclasses may extend.

Specified by:
init in interface org.eclipse.ui.part.IPageBookViewPage
Overrides:
init in class org.eclipse.ui.part.Page
Parameters:
pageSite - the page site

setInput

public void setInput(org.eclipse.search.ui.ISearchResult newSearchResult,
                     java.lang.Object uiState)
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Sets the search result to be shown in this search results page. Implementers should restore UI state (e.g. selection) from the previously saved uiState object.

Specified by:
setInput in interface org.eclipse.search.ui.ISearchResultPage
Parameters:
newSearchResult - the search result to be shown or null to clear the page.
uiState - the previously saved UI state
See Also:
ISearchResultPage.getUIState()

setViewPart

public void setViewPart(org.eclipse.search.ui.ISearchResultViewPart part)
Description copied from interface: org.eclipse.search.ui.ISearchResultPage
Sets the search view this search results page is shown in. This method will be called before the page is shown for the first time (i.e. before the page control is created).

Specified by:
setViewPart in interface org.eclipse.search.ui.ISearchResultPage
Parameters:
part - the parent search view

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Description copied from interface: org.eclipse.ui.part.IPage
Creates the SWT control for this page under the given parent control.

Clients should not call this method (the workbench calls this method when it needs to, which may be never).

Specified by:
createControl in interface org.eclipse.ui.part.IPage
Specified by:
createControl in class org.eclipse.ui.part.Page
Parameters:
parent - the parent control

createOpenAndLinkWithEditorHandler

protected org.eclipse.ui.OpenAndLinkWithEditorHelper createOpenAndLinkWithEditorHandler()

createQueryListener

protected org.eclipse.search.ui.IQueryListener createQueryListener()

dispose

public void dispose()
Description copied from class: org.eclipse.ui.part.Page
The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed). Subclasses may extend.

Specified by:
dispose in interface org.eclipse.ui.part.IPage
Overrides:
dispose in class org.eclipse.ui.part.Page

showBusyLabel

protected void showBusyLabel(boolean shouldShowBusy)

fillToolbar

protected void fillToolbar(org.eclipse.jface.action.IToolBarManager tbm)

handleOpen

protected void handleOpen(org.eclipse.jface.viewers.OpenEvent openEvent)

getControl

public org.eclipse.swt.widgets.Control getControl()
Description copied from class: org.eclipse.ui.part.Page
The Page implementation of this IPage method returns null. Subclasses must reimplement.

Specified by:
getControl in interface org.eclipse.ui.part.IPage
Specified by:
getControl in class org.eclipse.ui.part.Page
Returns:
the SWT control for this page, or null if this page does not have a control

setFocus

public void setFocus()
Description copied from class: org.eclipse.ui.part.Page
The Page implementation of this IPage method does nothing. Subclasses must implement.

Specified by:
setFocus in interface org.eclipse.ui.part.IPage
Specified by:
setFocus in class org.eclipse.ui.part.Page

getViewer

public org.eclipse.jface.viewers.TreeViewer getViewer()