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 interface
The 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 TypeMethodDescriptionvoid
dispose()
Object[]
getChildren
(Object parentElement) Object[]
getElements
(Object inputElement) boolean
hasChildren
(Object element) void
inputChanged
(Viewer viewer, Object oldInput, Object newInput)
-
Constructor Details
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIContentProvider
-
inputChanged
- Specified by:
inputChanged
in interfaceIContentProvider
-
getElements
- Specified by:
getElements
in interfaceIStructuredContentProvider
- Specified by:
getElements
in interfaceITreeContentProvider
-
getChildren
- Specified by:
getChildren
in interfaceITreeContentProvider
-
getParent
- Specified by:
getParent
in interfaceITreeContentProvider
-
hasChildren
- Specified by:
hasChildren
in interfaceITreeContentProvider
-