Package org.eclipse.handly.ui.search

## 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 java.lang.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 Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractSearchTreeContentProvider​(AbstractSearchResultPage page)` | Creates a new content provider for the given search result page.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clear()` | Notifies that all elements have been removed from the displayed search result.
    `void` | `elementsChanged​(java.lang.Object[] elements)` | Notifies that the set of matches for the given elements has changed.
    `java.lang.Object[]` | `getChildren​(java.lang.Object parentElement)` |
    `java.lang.Object[]` | `getElements​(java.lang.Object inputElement)` |
    `protected AbstractSearchResultPage` | `getPage()` | Returns the search result page passed into the constructor.
    `boolean` | `hasChildren​(java.lang.Object element)` |
    `void` | `inputChanged​(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.jface.viewers.IContentProvider

      `dispose`

    - ### Methods inherited from interface org.eclipse.jface.viewers.ITreeContentProvider

      `getParent`

- - ### Constructor Detail

    - #### AbstractSearchTreeContentProvider

          public AbstractSearchTreeContentProvider​(AbstractSearchResultPage page)

      Creates a new content provider for the given search result page.
      Parameters:
        `page` - not `null`

  - ### Method Detail

    - #### inputChanged

          public void inputChanged​(org.eclipse.jface.viewers.Viewer viewer,
                                   java.lang.Object oldInput,
                                   java.lang.Object newInput)

      Specified by:
        `inputChanged` in interface `org.eclipse.jface.viewers.IContentProvider`

    - #### getElements

          public java.lang.Object[] getElements​(java.lang.Object inputElement)

      Specified by:
        `getElements` in interface `org.eclipse.jface.viewers.IStructuredContentProvider`
      Specified by:
        `getElements` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

    - #### getChildren

          public java.lang.Object[] getChildren​(java.lang.Object parentElement)

      Specified by:
        `getChildren` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

    - #### hasChildren

          public boolean hasChildren​(java.lang.Object element)

      Specified by:
        `hasChildren` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

    - #### elementsChanged

          public void elementsChanged​(java.lang.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`)