public class PsiFileBreadcrumbsCollector extends FileBreadcrumbsCollector
EP_NAME
Constructor and Description |
---|
PsiFileBreadcrumbsCollector(Project project) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<Crumb> |
computeCrumbs(VirtualFile file,
Document document,
int offset,
java.lang.Boolean forcedShown) |
static PsiElement [] |
getLinePsiElements(Document document,
int offset,
VirtualFile file,
Project project,
BreadcrumbsProvider infoProvider) |
boolean |
handlesFile(VirtualFile virtualFile)
Checks if this collector handles the given file.
|
boolean |
isShownForFile(Editor editor,
VirtualFile file)
Checks if the breadcrumbs should be shown for the given file.
|
void |
watchForChanges(VirtualFile file,
Editor editor,
Disposable disposable,
java.lang.Runnable changesHandler)
Adds event listeners required to redraw the breadcrumbs when the contents of the file changes.
|
findBreadcrumbsCollector
public PsiFileBreadcrumbsCollector(Project project)
public boolean handlesFile(VirtualFile virtualFile)
FileBreadcrumbsCollector
handlesFile
in class FileBreadcrumbsCollector
public boolean isShownForFile(Editor editor, VirtualFile file)
FileBreadcrumbsCollector
isShownForFile
in class FileBreadcrumbsCollector
public void watchForChanges(VirtualFile file, Editor editor, Disposable disposable, java.lang.Runnable changesHandler)
FileBreadcrumbsCollector
watchForChanges
in class FileBreadcrumbsCollector
file
- the file to watcheditor
- current editordisposable
- the disposable used to detach listeners when the file is closed.changesHandler
- the callback to be called when any changes are detected.public java.lang.Iterable<Crumb> computeCrumbs(VirtualFile file, Document document, int offset, java.lang.Boolean forcedShown)
computeCrumbs
in class FileBreadcrumbsCollector
public static PsiElement [] getLinePsiElements(Document document, int offset, VirtualFile file, Project project, BreadcrumbsProvider infoProvider)