Class CachingTreeContentProvider
java.lang.Object
com._1c.g5.v8.dt.navigator.providers.CachingTreeContentProvider
- All Implemented Interfaces:
IContentProvider,IStructuredContentProvider,ITreeContentProvider
The implementation of Caches the children for the specific list of Caches the all children that were got. It is very useful for the serial calls of methods
The cache drops if only the input was changed. If the customer wants to drop the cache without input changes
he needs to recreate The cache size isn't limited, so the customers should keep it in mind.
ITreeContentProvider for caching children of FilteringTreeContentProvider.
Provides the following features:
Class'es. For the specific Class instance
firstly it tries to find its children in cache and if it was successful returns the cached children,
otherwise gets children fairly, caches them and returns them.
hasChildren(Object) and
getChildren(Object).
Important notes:
CachingTreeContentProvider.
CachingTreeContentProvider is the lightweight implementation of a caching tree content provider, so it
is better to use it for dialogs, and don't use it, for example, in the navigation tools.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe caching elements key provider. -
Constructor Summary
ConstructorsConstructorDescriptionCachingTreeContentProvider(FilteringTreeContentProvider innerTreeContentProvider, CachingTreeContentProvider.CachingKeyProvider keyProvider) Construct a new instance with the given inner tree content provider to call it methods and cache children.CachingTreeContentProvider(FilteringTreeContentProvider innerTreeContentProvider, Class<?>... classes) Construct a new instance with the given inner tree content provider to call it methods and cache children. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Object[]getChildren(Object parentElement) Object[]getElements(Object inputElement) booleanhasChildren(Object element) voidinputChanged(Viewer viewer, Object oldInput, Object newInput)
-
Constructor Details
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein interfaceIContentProvider
-
inputChanged
- Specified by:
inputChangedin interfaceIContentProvider
-
getElements
- Specified by:
getElementsin interfaceIStructuredContentProvider- Specified by:
getElementsin interfaceITreeContentProvider
-
getChildren
- Specified by:
getChildrenin interfaceITreeContentProvider
-
getParent
- Specified by:
getParentin interfaceITreeContentProvider
-
hasChildren
- Specified by:
hasChildrenin interfaceITreeContentProvider
-