Package com.iizigo.editor
Class EndNodeTextFilter
java.lang.Object
org.eclipse.jface.viewers.ViewerFilter
com.iizigo.editor.EndNodeTextFilter
- All Implemented Interfaces:
IFilterListener
public class EndNodeTextFilter extends org.eclipse.jface.viewers.ViewerFilter implements IFilterListener
An end-node text filter for Viewers used by the search engine.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorDescriptionCreates the filter, non-initialized.EndNodeTextFilter
(org.eclipse.jface.viewers.StructuredViewer viewer, IFilter filterComponent) Creates the filter for the viewer.Method Summary
Modifier and TypeMethodDescriptionvoid
addUnfiltered
(DesignerProp... props) Adds a DesignerProp extending class or a class that will never be filtered.void
addUnfiltered
(GProp<?>... props) Adds a DesignerProp extending class or a class that will never be filtered.void
addUnfiltered
(Class<?>... clazz) Adds a DesignerProp extending class or a class that will never be filtered.Gets the bold font styler.Gets the filter component.Gets the search text filter for the label provider.void
initialize
(org.eclipse.jface.viewers.StructuredViewer viewer, IFilter filterComponent) Initializes after creation from empty constructor.static boolean
isElementOmitted
(Class<?> clazz) Checks if an element class is omittedstatic boolean
isElementOmitted
(Object element) Checks if an element is omitted filtering for performance reasons, i.e.void
Notification that a new text has been set, null for none, never empty string.boolean
Returns whether the given element makes it through this filter.void
setFilterColumn
(int column) Sets the filtering column for the text for table viewers or tree table viewers.Methods inherited from class org.eclipse.jface.viewers.ViewerFilter
filter, filter, isFilterProperty
Constructor Details
EndNodeTextFilter
public EndNodeTextFilter()Creates the filter, non-initialized. Callinitialize(viewer,filterComponent)
to initialize.EndNodeTextFilter
public EndNodeTextFilter(org.eclipse.jface.viewers.StructuredViewer viewer, IFilter filterComponent) Creates the filter for the viewer.- Parameters:
viewer
- The common viewer.filterComponent
- The filter component.
Method Details
isElementOmitted
Checks if an element is omitted filtering for performance reasons, i.e. typically Java classpath, etc. null value also returns true.isElementOmitted
Checks if an element class is omittedsetFilterColumn
public void setFilterColumn(int column) Sets the filtering column for the text for table viewers or tree table viewers.initialize
Initializes after creation from empty constructor.- Parameters:
viewer
- The common viewer.filterComponent
- The filter component.
getFilterComponent
Gets the filter component.- Returns:
- The filter component, or null for none.
addUnfiltered
Adds a DesignerProp extending class or a class that will never be filtered.- Parameters:
clazz
- The list of classes that will not be filtered.
addUnfiltered
Adds a DesignerProp extending class or a class that will never be filtered.- Parameters:
props
- The list of properties that will not be filtered.
addUnfiltered
Adds a DesignerProp extending class or a class that will never be filtered.- Parameters:
props
- The list of properties that will not be filtered.
onFilter
Notification that a new text has been set, null for none, never empty string.- Specified by:
onFilter
in interfaceIFilterListener
- Parameters:
text
- The filter text to apply, null for none (never empty string).
getFilterText
Gets the search text filter for the label provider.- Returns:
- The filter text, or null for none, never empty string.
getBoldFontStyler
Gets the bold font styler.select
public boolean select(org.eclipse.jface.viewers.Viewer viewer, Object parentElement, Object element) Returns whether the given element makes it through this filter.- Specified by:
select
in classorg.eclipse.jface.viewers.ViewerFilter
- Parameters:
viewer
- The viewer.parentElement
- The parent element.element
- The element.- Returns:
true
if element is included in the filtered set, andfalse
if excluded.