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

    Constructors
    Constructor
    Description
    Creates the filter, non-initialized.
    EndNodeTextFilter(org.eclipse.jface.viewers.StructuredViewer viewer, IFilter filterComponent)
    Creates the filter for the viewer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    Checks if an element class is omitted
    static boolean
    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
    select(org.eclipse.jface.viewers.Viewer viewer, Object parentElement, Object element)
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EndNodeTextFilter

      public EndNodeTextFilter()
      Creates the filter, non-initialized. Call initialize(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

      public static boolean isElementOmitted(Object element)
      Checks if an element is omitted filtering for performance reasons, i.e. typically Java classpath, etc. null value also returns true.
    • isElementOmitted

      public static boolean isElementOmitted(Class<?> clazz)
      Checks if an element class is omitted
    • setFilterColumn

      public void setFilterColumn(int column)
      Sets the filtering column for the text for table viewers or tree table viewers.
    • initialize

      public void initialize(org.eclipse.jface.viewers.StructuredViewer viewer, IFilter filterComponent)
      Initializes after creation from empty constructor.
      Parameters:
      viewer - The common viewer.
      filterComponent - The filter component.
    • getFilterComponent

      public IFilter getFilterComponent()
      Gets the filter component.
      Returns:
      The filter component, or null for none.
    • addUnfiltered

      public void addUnfiltered(Class<?>... clazz)
      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

      public void addUnfiltered(GProp<?>... props)
      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

      public void addUnfiltered(DesignerProp... props)
      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

      public void onFilter(String text)
      Notification that a new text has been set, null for none, never empty string.
      Specified by:
      onFilter in interface IFilterListener
      Parameters:
      text - The filter text to apply, null for none (never empty string).
    • getFilterText

      public String getFilterText()
      Gets the search text filter for the label provider.
      Returns:
      The filter text, or null for none, never empty string.
    • getBoldFontStyler

      public BoldFontStyler 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 class org.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, and false if excluded.