Class BmPresentTreeFilter
- java.lang.Object
-
- com._1c.g5.v8.dt.navigator.filters.TreeItemFilter
-
- com._1c.g5.v8.dt.navigator.filters.BmCachingTreeFilter
-
- com._1c.g5.v8.dt.navigator.filters.BmPresentTreeFilter
-
public class BmPresentTreeFilter extends BmCachingTreeFilter
The extension ofBmCachingTreeFilter
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.
-
-
Constructor Summary
Constructors Constructor Description BmPresentTreeFilter(org.eclipse.emf.ecore.EObject container)
Creates a new isntance ofBmPresentTreeFilter
.BmPresentTreeFilter(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)
Creates a new isntance ofBmPresentTreeFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getChildren(Class<?> childrenClass)
Returns the child elements that are instances of the given childrenClass.protected Collection<?>
getItems(org.eclipse.emf.ecore.EObject container)
Gets the items.boolean
keep(Object element)
-
Methods inherited from class com._1c.g5.v8.dt.navigator.filters.BmCachingTreeFilter
dispose, getBmModel, getCached, invalidateOn, invalidateOn
-
Methods inherited from class com._1c.g5.v8.dt.navigator.filters.TreeItemFilter
isRecursive
-
-
-
-
Constructor Detail
-
BmPresentTreeFilter
public BmPresentTreeFilter(org.eclipse.emf.ecore.EObject container)
Creates a new isntance ofBmPresentTreeFilter
.- Parameters:
container
- the items container, can not benull
-
BmPresentTreeFilter
public BmPresentTreeFilter(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)
Creates a new isntance ofBmPresentTreeFilter
.- Parameters:
container
- the items container, can not benull
feature
- the feature to fetch a collection from, may benull
-
-
Method Detail
-
keep
public boolean keep(Object element)
- Specified by:
keep
in classTreeItemFilter
- Returns:
true
to keep anelement
,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 benull
- 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 benull
- Returns:
- the items, may be
null
-
-