public abstract class TodoTreeBuilder extends java.lang.Object implements Disposable
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
protected java.util.HashSet<VirtualFile> |
myDirtyFileSet
This set contains "dirty" files.
|
protected java.util.Map<VirtualFile,EditorHighlighter> |
myFile2Highlighter |
protected com.intellij.ide.todo.FileTree |
myFileTree
All files that have T.O.D.O items are presented as tree.
|
protected Project |
myProject |
protected PsiTodoSearchHelper |
mySearchHelper |
static java.util.Comparator<NodeDescriptor<?>> |
NODE_DESCRIPTOR_COMPARATOR |
public static final java.util.Comparator<NodeDescriptor<?>> NODE_DESCRIPTOR_COMPARATOR
protected final Project myProject
protected final com.intellij.ide.todo.FileTree myFileTree
protected final java.util.HashSet<VirtualFile> myDirtyFileSet
validateCache()
method.protected final java.util.Map<VirtualFile,EditorHighlighter> myFile2Highlighter
protected final PsiTodoSearchHelper mySearchHelper
public StructureTreeModel getModel()
public void setModel(StructureTreeModel model)
public final void init()
public boolean isDisposed()
public final void dispose()
Disposable
dispose
in interface Disposable
protected abstract TodoTreeStructure createTreeStructure()
public final TodoTreeStructure getTodoTreeStructure()
public java.util.Iterator<PsiFile> getAllFiles()
remove
method. For "removing" use markFileAsDirty
method.
Note, that next()
method of iterator can return null
elements.
These null
elements correspond to the invalid PSI files (PSI file cannot be found by
virtual file, or virtual file is invalid).
The reason why we return such "dirty" iterator is the performance.public java.util.Iterator<PsiFile> getFiles(PsiDirectory psiDirectory)
psiDirectory
.FileTree.getFiles(VirtualFile)
public java.util.Iterator<PsiFile> getFiles(PsiDirectory psiDirectory, boolean skip)
psiDirectory
.FileTree.getFiles(VirtualFile)
public java.util.Iterator<PsiFile> getFilesUnderDirectory(PsiDirectory psiDirectory)
psiDirectory
.FileTree.getFiles(VirtualFile)
public java.util.Iterator<PsiFile> getFiles(Module module)
module
.FileTree.getFiles(VirtualFile)
protected boolean isAutoExpandNode(NodeDescriptor descriptor)
public TodoItemNode getFirstPointerForElement(java.lang.Object element)
SmartTodoItemPointer
that is the children (in depth) of the specified element
.
If element
itself is a TodoItem
then the method returns the element
.public TodoItemNode getLastPointerForElement(java.lang.Object element)
SmartTodoItemPointer
that is the children (in depth) of the specified element
.
If element
itself is a TodoItem
then the method returns the element
.public final Promise<?> updateTree()
public void select(java.lang.Object obj)
public TodoItemNode getNextPointer(TodoItemNode pointer)
TodoItem
for the passed pointer
. Returns null
if the pointer
is the last t.o.d.o item in the tree.public TodoItemNode getPreviousPointer(TodoItemNode pointer)
SmartTodoItemPointer
for the passed pointer
. Returns null
if the pointer
is the last t.o.d.o item in the tree.public EditorHighlighter getHighlighter(PsiFile psiFile, Document document)
SelectInEditorManager
for the specified psiFile
. Highlighters are
lazy created and initialized.public boolean isDirectoryEmpty(PsiDirectory psiDirectory)