Class SelectPropViewerFilter

  • Direct Known Subclasses:
    ImageDefinitionFilter

    public class SelectPropViewerFilter
    extends org.eclipse.jface.viewers.ViewerFilter
    A viewer filter for extends properties.
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SelectPropViewerFilter add​(java.lang.Class<?>... cs)
      Adds other class to the same filter.
      void addFilter​(org.eclipse.jface.viewers.ViewerFilter filter)
      Adds an additional filter.
      boolean isValid​(PropCnr pc)
      Checks for a valid class in this property of its children.
      boolean isValidSelection​(PropCnr pc)
      Checks if a property is of a valid class to be selected as final selection.
      boolean select​(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object parentElement, java.lang.Object element)
      Filters what is passed through.
      void setValidModules​(ModuleModel[] modules)
      Sets the valid projects for the workspace root.
      • 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 Detail

      • SelectPropViewerFilter

        public SelectPropViewerFilter()
        Creates the viewer filter for no accept.
      • SelectPropViewerFilter

        public SelectPropViewerFilter​(java.lang.Class<?>[] possibleClasses)
        Creates the viewer filter.
        Parameters:
        possibleClasses - The classes that can be end nodes, null for none..
    • Method Detail

      • setValidModules

        public void setValidModules​(ModuleModel[] modules)
        Sets the valid projects for the workspace root.
        Parameters:
        modules - The valid modules array, or null for all (default).
      • add

        public SelectPropViewerFilter add​(java.lang.Class<?>... cs)
        Adds other class to the same filter.
        Parameters:
        cs - The new classes to add.
        Returns:
        The same instance.
      • addFilter

        public void addFilter​(org.eclipse.jface.viewers.ViewerFilter filter)
        Adds an additional filter.
      • select

        public boolean select​(org.eclipse.jface.viewers.Viewer viewer,
                              java.lang.Object parentElement,
                              java.lang.Object element)
        Filters what is passed through.
        Specified by:
        select in class org.eclipse.jface.viewers.ViewerFilter
      • isValidSelection

        public boolean isValidSelection​(PropCnr pc)
        Checks if a property is of a valid class to be selected as final selection.
        Parameters:
        pc - The property.
        Returns:
        If OK, false if a child of this container may be selectable.
      • isValid

        public boolean isValid​(PropCnr pc)
        Checks for a valid class in this property of its children.