Class ContainmentTreeContentProvider
- java.lang.Object
-
- com._1c.g5.v8.dt.navigator.providers.FilteringTreeContentProvider
-
- com._1c.g5.v8.dt.navigator.providers.ContainmentTreeContentProvider
-
- All Implemented Interfaces:
IContentProvider
,IStructuredContentProvider
,ITreeContentProvider
public class ContainmentTreeContentProvider extends FilteringTreeContentProvider
The implementation ofITreeContentProvider
. When you call methodsgetElements(Object)
andgetChildren(Object)
to filter children it firstly tries to useISubtreeInducer
if possible, then usesBmPresentTreeFilter
.- See Also:
SubtreeInducerTreeContentProvider
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.navigator.providers.FilteringTreeContentProvider
hasMatchingDescendants, sourceProvider, subtreeInducer, treeItemFilters
-
-
Constructor Summary
Constructors Constructor Description ContainmentTreeContentProvider(ITreeContentProvider sourceProvider, ISubtreeInducer subtreeInducer, BmPresentTreeFilter presentTreeFilter, Map<Class<?>,Class<?>> parent2ChildrenClass)
Creates a new instance with the given parameters.ContainmentTreeContentProvider(ITreeContentProvider sourceProvider, ISubtreeInducer subtreeInducer, BmPresentTreeFilter presentTreeFilter, Map<Class<?>,Class<?>> parent2ChildrenClass, TreeItemFilter... treeItemFilters)
Creates a new instance with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Object[]
getChildren(Object parentElement)
Object[]
getElements(Object inputElement)
protected boolean
hasAnyMatchingChildren(Object element)
Determines if the given tree element has any matching children in its subtree, that is at least one matching child.-
Methods inherited from class com._1c.g5.v8.dt.navigator.providers.FilteringTreeContentProvider
dropCache, filterChildren, filterChildrenBySubtreeInducer, getParent, hasChildren, hasChildrenLightweight, hasMatchingDescendants, hasOuterToSubtreeChildren, inputChanged, inSubgraph, isSubgraphInnerNode, keepChild
-
-
-
-
Constructor Detail
-
ContainmentTreeContentProvider
public ContainmentTreeContentProvider(ITreeContentProvider sourceProvider, ISubtreeInducer subtreeInducer, BmPresentTreeFilter presentTreeFilter, Map<Class<?>,Class<?>> parent2ChildrenClass)
Creates a new instance with the given parameters.- Parameters:
sourceProvider
- the source provider, can not benull
subtreeInducer
- theISubtreeInducer
to apply, can not benull
presentTreeFilter
- theBmPresentTreeFilter
instance, can not benull
parent2ChildrenClass
- the mapping from parent classes to the children classes, can not benull
-
ContainmentTreeContentProvider
public ContainmentTreeContentProvider(ITreeContentProvider sourceProvider, ISubtreeInducer subtreeInducer, BmPresentTreeFilter presentTreeFilter, Map<Class<?>,Class<?>> parent2ChildrenClass, TreeItemFilter... treeItemFilters)
Creates a new instance with the given parameters.- Parameters:
sourceProvider
- the source provider, can not benull
subtreeInducer
- theISubtreeInducer
to apply, can not benull
presentTreeFilter
- theBmPresentTreeFilter
instance, can not benull
parent2ChildrenClass
- the mapping from parent classes to the children classes, can not benull
treeItemFilters
- theTreeItemFilter
's to apply, can not benull
-
-
Method Detail
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceIContentProvider
- Overrides:
dispose
in classFilteringTreeContentProvider
-
getElements
public Object[] getElements(Object inputElement)
- Specified by:
getElements
in interfaceIStructuredContentProvider
- Specified by:
getElements
in interfaceITreeContentProvider
- Overrides:
getElements
in classFilteringTreeContentProvider
-
getChildren
public Object[] getChildren(Object parentElement)
- Specified by:
getChildren
in interfaceITreeContentProvider
- Overrides:
getChildren
in classFilteringTreeContentProvider
-
hasAnyMatchingChildren
protected boolean hasAnyMatchingChildren(Object element)
Description copied from class:FilteringTreeContentProvider
Determines if the given tree element has any matching children in its subtree, that is at least one matching child.- Overrides:
hasAnyMatchingChildren
in classFilteringTreeContentProvider
- Parameters:
element
- the given tree element, can not benull
- Returns:
true
if the given tree element has any matching children in its subtree andfalse
otherwise
-
-