|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.progress.DeferredTreeContentManager
The DeferredContentManager is a class that helps an ITreeContentProvider get its deferred input. NOTE AbstractTreeViewer#isExpandable may need to be implemented in AbstractTreeViewer subclasses with deferred content that use filtering as a call to #getChildren may be required to determine the correct state of the expanding control. AbstractTreeViewers which use this class may wish to sacrifice accuracy of the expandable state indicator for the performance benefits of defering content.
IDeferredWorkbenchAdapter
Constructor Summary | |
DeferredTreeContentManager(ITreeContentProvider provider,
AbstractTreeViewer viewer)
Create a new instance of the receiver using the supplied content provider and viewer. |
|
DeferredTreeContentManager(ITreeContentProvider provider,
AbstractTreeViewer viewer,
IWorkbenchPartSite site)
Create a new instance of the receiver using the supplied content provider and viewer. |
Method Summary | |
protected void |
addChildren(Object parent,
Object[] children,
IProgressMonitor monitor)
Create a UIJob to add the children to the parent in the tree viewer. |
void |
cancel(Object parent)
Cancel all jobs that are fetching content for the given parent or any of its children. |
protected IElementCollector |
createElementCollector(Object parent,
org.eclipse.ui.internal.progress.PendingUpdateAdapter placeholder)
Create the element collector for the receiver. |
protected IDeferredWorkbenchAdapter |
getAdapter(Object element)
Return the IDeferredWorkbenchAdapter for element or the element if it is an instance of IDeferredWorkbenchAdapter. |
Object[] |
getChildren(Object parent)
Returns the child elements of the given element, or in the case of a deferred element, returns a placeholder. |
boolean |
isDeferredAdapter(Object element)
Return whether or not the element is or adapts to an IDeferredWorkbenchAdapter. |
boolean |
mayHaveChildren(Object element)
Provides an optimized lookup for determining if an element has children. |
protected void |
runClearPlaceholderJob(org.eclipse.ui.internal.progress.PendingUpdateAdapter placeholder)
Run a job to clear the placeholder. |
protected void |
startFetchingDeferredChildren(Object parent,
IDeferredWorkbenchAdapter adapter,
org.eclipse.ui.internal.progress.PendingUpdateAdapter placeholder)
Starts a job and creates a collector for fetching the children of this deferred adapter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DeferredTreeContentManager(ITreeContentProvider provider, AbstractTreeViewer viewer, IWorkbenchPartSite site)
provider
- viewer
- site
- public DeferredTreeContentManager(ITreeContentProvider provider, AbstractTreeViewer viewer)
provider
- The content provider that will be updatedviewer
- The tree viewer that the results are added toMethod Detail |
public boolean mayHaveChildren(Object element)
getChildren
just to determine the potential for
children. Throw an AssertionFailedException if element is not an
instance of IDeferredWorkbenchAdapter.
element
- The Object being tested. This should not be
null
.
true
if there are potentially children.
RuntimeException
- if the element is null.public Object[] getChildren(Object parent)
parent
- The parent object.
null
if parent is not an instance of
IDeferredWorkbenchAdapter.protected IDeferredWorkbenchAdapter getAdapter(Object element)
element
-
null
protected void startFetchingDeferredChildren(Object parent, IDeferredWorkbenchAdapter adapter, org.eclipse.ui.internal.progress.PendingUpdateAdapter placeholder)
parent
- The parent object being filled in,adapter
- The adapter being used to fetch the children.placeholder
- The adapter that will be used to indicate that results are
pending.protected void addChildren(Object parent, Object[] children, IProgressMonitor monitor)
parent
- children
- monitor
- public boolean isDeferredAdapter(Object element)
element
-
true
if the element is an
IDeferredWorkbenchAdapterprotected void runClearPlaceholderJob(org.eclipse.ui.internal.progress.PendingUpdateAdapter placeholder)
placeholder
- public void cancel(Object parent)
parent
- protected IElementCollector createElementCollector(Object parent, org.eclipse.ui.internal.progress.PendingUpdateAdapter placeholder)
parent
- The parent object being filled in,placeholder
- The adapter that will be used to indicate that results are
pending.
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.