Class AbstractSubsystemFilter

  • Direct Known Subclasses:
    SubsystemsFilter

    public abstract class AbstractSubsystemFilter
    extends ViewerFilter
    A viewer filter to filter navigator tree by subsystems.
    • Constructor Detail

      • AbstractSubsystemFilter

        public AbstractSubsystemFilter()
    • Method Detail

      • belongsToSubsystem

        protected boolean belongsToSubsystem​(ITreeContentProvider provider,
                                             Object element,
                                             Collection<Subsystem> subsystems)
        Determines whether the given element or its child belongs to the given set of subsystems.
        Parameters:
        provider - the tree content provider, can not be null
        element - the given tree element, can not be null
        subsystems - the given set of subsystems, can not be null
        Returns:
        true if the given element or its child belongs to the given set of subsystems and false otherwise
      • findInSubsystemsContent

        protected boolean findInSubsystemsContent​(Object element,
                                                  Collection<Subsystem> subsystems)
        Determines whether the given element belongs to the given set of subsystems.
        Parameters:
        element - the given tree element, can not be null
        subsystems - the given set of subsystems, can not be null
        Returns:
        true if the given belongs to the given set of subsystems and false otherwise
      • notIncludedInAnySubsystem

        protected boolean notIncludedInAnySubsystem​(ITreeContentProvider provider,
                                                    Object element,
                                                    Collection<Subsystem> subsystems)
        Determines whether the given element or its child doesn't belong to any subsystem from the given set of subsystems.
        Parameters:
        provider - the tree content provider, can not be null
        element - the given tree element, can not be null
        subsystems - the given set of subsystems, can not be null
        Returns:
        true if the given element or its child doesn't belong to any subsystem from the given set of subsystems and false otherwise
      • getChildren

        protected abstract Stream<Object> getChildren​(ITreeContentProvider provider,
                                                      Object element)
        Gets the stream of children for the given element.
        Parameters:
        provider - the tree content provider, can not be null
        element - the given tree element, can not be null
        Returns:
        the stream of children, never null