public class BackgroundOutlineTreeProvider extends java.lang.Object implements IOutlineTreeStructureProvider, IOutlineTreeProvider, IOutlineTreeProvider.Background, IOutlineTreeProvider.Cancelable
ImageDescriptor
s instead of Image
s. This allows to create
the tree of IOutlineNode
s in a background job. Use this class instead of the
DefaultOutlineTreeProvider
if the UI blocks too long because of the outline calculation. Note that the
default implementation already calculates hidden nodes on demand only.
It is essential that the ILabelProvider
implements ILabelProviderImageDescriptorExtension
and that
the method ILabelProviderImageDescriptorExtension.getImageDescriptor(Object)
does not need to be executed in
the Display
thread, e.g. does not create Image
objects internally.IOutlineTreeProvider.Background, IOutlineTreeProvider.Cancelable, IOutlineTreeProvider.ModeAware
Constructor and Description |
---|
BackgroundOutlineTreeProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkCanceled() |
void |
createChildren(IOutlineNode parentNode,
org.eclipse.emf.ecore.EObject modelElement) |
protected EObjectNode |
createNode(IOutlineNode parentNode,
org.eclipse.emf.ecore.EObject modelElement) |
IOutlineNode |
createRoot(IXtextDocument document) |
IOutlineNode |
createRoot(IXtextDocument document,
CancelIndicator cancelIndicator) |
protected org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(java.lang.Object modelElement) |
protected org.eclipse.jface.viewers.ILabelProvider |
getLabelProvider()
TODO will provide an annotatedWith based Binding later
|
protected OutlineNodeFactory |
getOutlineNodeFactory() |
protected java.lang.Object |
getText(java.lang.Object modelElement) |
protected void |
internalCreateChildren(DocumentRootNode parentNode,
org.eclipse.emf.ecore.EObject modelElement) |
protected void |
internalCreateChildren(EStructuralFeatureNode parentNode,
org.eclipse.emf.ecore.EObject modelElement) |
protected void |
internalCreateChildren(IOutlineNode parentNode,
org.eclipse.emf.ecore.EObject modelElement) |
protected boolean |
isLeaf(org.eclipse.emf.ecore.EObject modelElement) |
public IOutlineNode createRoot(IXtextDocument document, CancelIndicator cancelIndicator)
createRoot
in interface IOutlineTreeProvider.Cancelable
public IOutlineNode createRoot(IXtextDocument document)
createRoot
in interface IOutlineTreeProvider
protected void checkCanceled()
public void createChildren(IOutlineNode parentNode, org.eclipse.emf.ecore.EObject modelElement)
createChildren
in interface IOutlineTreeStructureProvider
protected void internalCreateChildren(DocumentRootNode parentNode, org.eclipse.emf.ecore.EObject modelElement)
protected void internalCreateChildren(EStructuralFeatureNode parentNode, org.eclipse.emf.ecore.EObject modelElement)
protected void internalCreateChildren(IOutlineNode parentNode, org.eclipse.emf.ecore.EObject modelElement)
protected EObjectNode createNode(IOutlineNode parentNode, org.eclipse.emf.ecore.EObject modelElement)
protected org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.Object modelElement)
protected java.lang.Object getText(java.lang.Object modelElement)
protected boolean isLeaf(org.eclipse.emf.ecore.EObject modelElement)
protected OutlineNodeFactory getOutlineNodeFactory()
protected org.eclipse.jface.viewers.ILabelProvider getLabelProvider()