Class AbstractSearchTreeContentProvider

java.lang.Object
org.eclipse.handly.ui.search.AbstractSearchTreeContentProvider
All Implemented Interfaces:
ISearchContentProvider, org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.jface.viewers.ITreeContentProvider

public abstract class AbstractSearchTreeContentProvider extends Object implements org.eclipse.jface.viewers.ITreeContentProvider
A partial implementation of ISearchContentProvider for the tree viewer. Subclasses need to implement ITreeContentProvider.getParent(Object) to complete the implementation.
  • Constructor Details

    • AbstractSearchTreeContentProvider

      public AbstractSearchTreeContentProvider(AbstractSearchResultPage page)
      Creates a new content provider for the given search result page.
      Parameters:
      page - not null
  • Method Details

    • inputChanged

      public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput)
      Specified by:
      inputChanged in interface org.eclipse.jface.viewers.IContentProvider
    • getElements

      public Object[] getElements(Object inputElement)
      Specified by:
      getElements in interface org.eclipse.jface.viewers.IStructuredContentProvider
      Specified by:
      getElements in interface org.eclipse.jface.viewers.ITreeContentProvider
    • getChildren

      public Object[] getChildren(Object parentElement)
      Specified by:
      getChildren in interface org.eclipse.jface.viewers.ITreeContentProvider
    • hasChildren

      public boolean hasChildren(Object element)
      Specified by:
      hasChildren in interface org.eclipse.jface.viewers.ITreeContentProvider
    • elementsChanged

      public void elementsChanged(Object[] elements)
      Description copied from interface: ISearchContentProvider
      Notifies that the set of matches for the given elements has changed.

      This method is guaranteed to be called in the UI thread. Note that this notification is asynchronous, i.e., further changes may have occurred by the time this method is called. They will be described in a future call.

      Specified by:
      elementsChanged in interface ISearchContentProvider
      Parameters:
      elements - never null
    • clear

      public void clear()
      Description copied from interface: ISearchContentProvider
      Notifies that all elements have been removed from the displayed search result.

      This method is guaranteed to be called in the UI thread. Note that this notification is asynchronous, i.e., further changes may have occurred by the time this method is called. They will be described in a future call.

      Specified by:
      clear in interface ISearchContentProvider
    • getPage

      protected AbstractSearchResultPage getPage()
      Returns the search result page passed into the constructor.
      Returns:
      the search result page (never null)