Class EndNodeTextFilter

All Implemented Interfaces:
IFilterListener

public class EndNodeTextFilter extends ViewerFilter implements IFilterListener
An end-node text filter for Viewers used by the search engine.
Author:
Christopher Mindus
  • Constructor Details

    • EndNodeTextFilter

      public EndNodeTextFilter()
      Creates the filter, non-initialized. Call initialize(viewer,filterComponent) to initialize.
    • EndNodeTextFilter

      public EndNodeTextFilter(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(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(Viewer viewer, Object parentElement, Object element)
      Returns whether the given element makes it through this filter.
      Specified by:
      select in class 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.