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 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
ConstructorDescriptionCreates a new content provider for the given search result page. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Notifies that all elements have been removed from the displayed search result.void
elementsChanged
(Object[] elements) Notifies that the set of matches for the given elements has changed.Object[]
getChildren
(Object parentElement) Object[]
getElements
(Object inputElement) protected AbstractSearchResultPage
getPage()
Returns the search result page passed into the constructor.boolean
hasChildren
(Object element) void
inputChanged
(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, 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 Details
-
AbstractSearchTreeContentProvider
Creates a new content provider for the given search result page.- Parameters:
page
- notnull
-
-
Method Details
-
inputChanged
- Specified by:
inputChanged
in interfaceorg.eclipse.jface.viewers.IContentProvider
-
getElements
- Specified by:
getElements
in interfaceorg.eclipse.jface.viewers.IStructuredContentProvider
- Specified by:
getElements
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
-
getChildren
- Specified by:
getChildren
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
-
hasChildren
- Specified by:
hasChildren
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
-
elementsChanged
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 interfaceISearchContentProvider
- Parameters:
elements
- nevernull
-
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 interfaceISearchContentProvider
-
getPage
Returns the search result page passed into the constructor.- Returns:
- the search result page (never
null
)
-