public abstract class HierarchyTreeStructure extends AbstractTreeStructure
Modifier and Type | Field and Description |
---|---|
protected HierarchyNodeDescriptor |
myBaseDescriptor |
protected Project |
myProject |
Modifier | Constructor and Description |
---|---|
protected |
HierarchyTreeStructure(Project project,
HierarchyNodeDescriptor baseDescriptor) |
Modifier and Type | Method and Description |
---|---|
ActionCallback |
asyncCommit() |
protected abstract java.lang.Object [] |
buildChildren(HierarchyNodeDescriptor descriptor) |
void |
commit() |
NodeDescriptor |
createDescriptor(java.lang.Object element,
NodeDescriptor parentDescriptor) |
protected java.lang.String |
formatBaseElementText() |
HierarchyNodeDescriptor |
getBaseDescriptor() |
java.lang.Object [] |
getChildElements(java.lang.Object element) |
LeafState |
getLeafState(java.lang.Object element) |
java.lang.Object |
getParentElement(java.lang.Object element) |
java.lang.Object |
getRootElement() |
protected SearchScope |
getSearchScope(java.lang.String scopeType,
PsiElement thisClass) |
boolean |
hasSomethingToCommit() |
boolean |
isAlwaysShowPlus() |
protected boolean |
isInScope(PsiElement baseClass,
PsiElement srcElement,
java.lang.String scopeType) |
boolean |
isToBuildChildrenInBackground(java.lang.Object element) |
protected void |
setBaseElement(HierarchyNodeDescriptor baseElement) |
asyncCommitDocuments, isAlwaysLeaf, isValid, revalidateElement
protected HierarchyNodeDescriptor myBaseDescriptor
protected final Project myProject
protected HierarchyTreeStructure(Project project, HierarchyNodeDescriptor baseDescriptor)
public final HierarchyNodeDescriptor getBaseDescriptor()
protected final void setBaseElement(HierarchyNodeDescriptor baseElement)
public final NodeDescriptor createDescriptor(java.lang.Object element, NodeDescriptor parentDescriptor)
createDescriptor
in class AbstractTreeStructure
public final boolean isToBuildChildrenInBackground(java.lang.Object element)
isToBuildChildrenInBackground
in class AbstractTreeStructure
public final java.lang.Object [] getChildElements(java.lang.Object element)
getChildElements
in class AbstractTreeStructure
public final java.lang.Object getParentElement(java.lang.Object element)
getParentElement
in class AbstractTreeStructure
public final void commit()
commit
in class AbstractTreeStructure
public final boolean hasSomethingToCommit()
hasSomethingToCommit
in class AbstractTreeStructure
public ActionCallback asyncCommit()
asyncCommit
in class AbstractTreeStructure
ActionCallback.setDone()
when the tree structure is committed.
By default it just calls AbstractTreeStructure.commit()
synchronously but it is desirable to override it
to provide asynchronous commit to the tree structure to make it more responsible.
E.g. when you should commit all documents during the AbstractTreeStructure.commit()
,
you can use AbstractTreeStructure.asyncCommitDocuments(Project)
to do it asynchronously.protected abstract java.lang.Object [] buildChildren(HierarchyNodeDescriptor descriptor)
public final java.lang.Object getRootElement()
getRootElement
in class AbstractTreeStructure
protected SearchScope getSearchScope(java.lang.String scopeType, PsiElement thisClass)
protected boolean isInScope(PsiElement baseClass, PsiElement srcElement, java.lang.String scopeType)
public LeafState getLeafState(java.lang.Object element)
getLeafState
in class AbstractTreeStructure
element
- an object that represents a node in this tree structureLeafState.Supplier#getLeafState()
public boolean isAlwaysShowPlus()
protected java.lang.String formatBaseElementText()