Class BmPresentTreeFilter


  • public class BmPresentTreeFilter
    extends BmCachingTreeFilter
    The extension of BmCachingTreeFilter to get children of a tested object that contained in the list of the edited object and do it quickly. The list of the edited object is the content of the specified container feature.
    • Field Detail

      • container

        protected final org.eclipse.emf.ecore.EObject container
        the items container
      • feature

        protected final org.eclipse.emf.ecore.EStructuralFeature feature
        the feature to fetch a collection from
    • Constructor Detail

      • BmPresentTreeFilter

        public BmPresentTreeFilter​(org.eclipse.emf.ecore.EObject container)
        Creates a new isntance of BmPresentTreeFilter.
        Parameters:
        container - the items container, can not be null
      • BmPresentTreeFilter

        public BmPresentTreeFilter​(org.eclipse.emf.ecore.EObject container,
                                   org.eclipse.emf.ecore.EStructuralFeature feature)
        Creates a new isntance of BmPresentTreeFilter.
        Parameters:
        container - the items container, can not be null
        feature - the feature to fetch a collection from, may be null
    • Method Detail

      • keep

        public boolean keep​(Object element)
        Specified by:
        keep in class TreeItemFilter
        Returns:
        true to keep an element, false to filter it out.
      • getChildren

        public Object[] getChildren​(Class<?> childrenClass)
        Returns the child elements that are instances of the given childrenClass.
        Parameters:
        childrenClass - the given class to filter children, can not be null
        Returns:
        the child elements, can not be null
      • getItems

        protected Collection<?> getItems​(org.eclipse.emf.ecore.EObject container)
        Gets the items. Override this method if you do not specify a feature to fetch the items from.
        Parameters:
        container - the items container, can not be null
        Returns:
        the items, may be null