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.ITreeContentProviderA partial implementation ofISearchContentProviderfor the tree viewer. Subclasses need to implementITreeContentProvider.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 voidclear()Notifies that all elements have been removed from the displayed search result.voidelementsChanged(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 AbstractSearchResultPagegetPage()Returns the search result page passed into the constructor.booleanhasChildren(java.lang.Object element)voidinputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
-
-
-
Constructor Detail
-
AbstractSearchTreeContentProvider
public AbstractSearchTreeContentProvider(AbstractSearchResultPage page)
Creates a new content provider for the given search result page.- Parameters:
page- notnull
-
-
Method Detail
-
inputChanged
public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)- Specified by:
inputChangedin interfaceorg.eclipse.jface.viewers.IContentProvider
-
getElements
public java.lang.Object[] getElements(java.lang.Object inputElement)
- Specified by:
getElementsin interfaceorg.eclipse.jface.viewers.IStructuredContentProvider- Specified by:
getElementsin interfaceorg.eclipse.jface.viewers.ITreeContentProvider
-
getChildren
public java.lang.Object[] getChildren(java.lang.Object parentElement)
- Specified by:
getChildrenin interfaceorg.eclipse.jface.viewers.ITreeContentProvider
-
hasChildren
public boolean hasChildren(java.lang.Object element)
- Specified by:
hasChildrenin interfaceorg.eclipse.jface.viewers.ITreeContentProvider
-
elementsChanged
public void elementsChanged(java.lang.Object[] elements)
Description copied from interface:ISearchContentProviderNotifies 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:
elementsChangedin interfaceISearchContentProvider- Parameters:
elements- nevernull
-
clear
public void clear()
Description copied from interface:ISearchContentProviderNotifies 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:
clearin interfaceISearchContentProvider
-
getPage
protected AbstractSearchResultPage getPage()
Returns the search result page passed into the constructor.- Returns:
- the search result page (never
null)
-
-