|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.ide.structureView.TextEditorBasedStructureViewModel
public abstract class TextEditorBasedStructureViewModel
The standard StructureViewModel implementation which is linked to a text editor.
TreeBasedStructureViewBuilder.createStructureViewModel()| Constructor Summary | |
|---|---|
protected |
TextEditorBasedStructureViewModel(Editor editor)
Creates a structure view model instance linked to the specified text editor. |
protected |
TextEditorBasedStructureViewModel(PsiFile psiFile)
Creates a structure view model instance linked to a text editor displaying the specified file. |
| Method Summary | |
|---|---|
void |
addEditorPositionListener(FileEditorPositionListener listener)
Adds a listener which gets notified when the selection in the editor linked to the structure view moves to a different element visible in the structure view. |
void |
addModelListener(ModelListener modelListener)
Adds a listener which gets notified when the data represented by the structure view is changed and the structure view needs to be rebuilt. |
void |
dispose()
Disposes of the model. |
java.lang.Object |
getCurrentEditorElement()
Returns the element currently selected in the editor linked to the structure view. |
protected Editor |
getEditor()
|
protected abstract PsiFile |
getPsiFile()
|
protected abstract java.lang.Class[] |
getSuitableClasses()
Returns the list of PSI element classes which are shown as structure view elements. |
protected boolean |
isSuitable(PsiElement element)
|
void |
removeEditorPositionListener(FileEditorPositionListener listener)
Removes a listener which gets notified when the selection in the editor linked to the structure view moves to a different element visible in the structure view. |
void |
removeModelListener(ModelListener modelListener)
Removes a listener which gets notified when the data represented by the structure view is changed and the structure view needs to be rebuilt. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.intellij.ide.structureView.StructureViewModel |
|---|
getRoot |
| Methods inherited from interface com.intellij.ide.util.treeView.smartTree.TreeModel |
|---|
getFilters, getGroupers, getSorters |
| Constructor Detail |
|---|
protected TextEditorBasedStructureViewModel(@NotNull
PsiFile psiFile)
psiFile - the file for which the structure view model is requested.protected TextEditorBasedStructureViewModel(Editor editor)
editor - the editor for which the structure view model is requested.| Method Detail |
|---|
public final void addEditorPositionListener(FileEditorPositionListener listener)
StructureViewModel
addEditorPositionListener in interface StructureViewModellistener - the listener to add.public final void removeEditorPositionListener(FileEditorPositionListener listener)
StructureViewModel
removeEditorPositionListener in interface StructureViewModellistener - the listener to remove.public void dispose()
StructureViewModel
dispose in interface StructureViewModelpublic java.lang.Object getCurrentEditorElement()
StructureViewModel
getCurrentEditorElement in interface StructureViewModelprotected abstract PsiFile getPsiFile()
protected boolean isSuitable(PsiElement element)
public void addModelListener(ModelListener modelListener)
StructureViewModel
addModelListener in interface StructureViewModelmodelListener - the listener to add.public void removeModelListener(ModelListener modelListener)
StructureViewModel
removeModelListener in interface StructureViewModelmodelListener - the listener to remove.@NotNull protected abstract java.lang.Class[] getSuitableClasses()
protected Editor getEditor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||