public class TreeModelWrapper extends java.lang.Object implements StructureViewModel, ProvidingTreeModel
StructureViewModel.ElementInfoProvider, StructureViewModel.ExpandInfoProviderDisposable.Parent| Constructor and Description |
|---|
TreeModelWrapper(StructureViewModel model,
TreeActionsOwner structureView) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Filter [] |
getFilters()
Returns the array of actions for filtering items in the tree.
|
Grouper [] |
getGroupers()
Returns the list of actions for grouping items in the tree.
|
StructureViewModel |
getModel() |
java.util.Collection<NodeProvider> |
getNodeProviders() |
StructureViewTreeElement |
getRoot()
Returns the root element of the structure view tree.
|
Sorter [] |
getSorters()
Returns the array of actions for sorting items in the tree.
|
static boolean |
isActive(TreeAction action,
TreeActionsOwner actionsOwner) |
boolean |
isEnabled(NodeProvider provider) |
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.
|
boolean |
shouldEnterElement(java.lang.Object element) |
static boolean |
shouldRevert(TreeAction action) |
public TreeModelWrapper(StructureViewModel model, TreeActionsOwner structureView)
public StructureViewTreeElement getRoot()
StructureViewModelgetRoot in interface StructureViewModelgetRoot in interface TreeModelpublic Grouper [] getGroupers()
TreeModelgetGroupers in interface TreeModelGrouper.EMPTY_ARRAYpublic Sorter [] getSorters()
TreeModelgetSorters in interface TreeModelSorter.EMPTY_ARRAYpublic Filter [] getFilters()
TreeModelgetFilters in interface TreeModelFilter.EMPTY_ARRAYpublic java.lang.Object getCurrentEditorElement()
StructureViewModelgetCurrentEditorElement in interface StructureViewModelpublic java.util.Collection<NodeProvider> getNodeProviders()
getNodeProviders in interface ProvidingTreeModelpublic static boolean isActive(TreeAction action, TreeActionsOwner actionsOwner)
public static boolean shouldRevert(TreeAction action)
public void addEditorPositionListener(FileEditorPositionListener listener)
StructureViewModeladdEditorPositionListener in interface StructureViewModellistener - the listener to add.public void removeEditorPositionListener(FileEditorPositionListener listener)
StructureViewModelremoveEditorPositionListener in interface StructureViewModellistener - the listener to remove.public void dispose()
StructureViewModeldispose in interface StructureViewModeldispose in interface Disposablepublic boolean shouldEnterElement(java.lang.Object element)
shouldEnterElement in interface StructureViewModelpublic void addModelListener(ModelListener modelListener)
StructureViewModeladdModelListener in interface StructureViewModelmodelListener - the listener to add.public void removeModelListener(ModelListener modelListener)
StructureViewModelremoveModelListener in interface StructureViewModelmodelListener - the listener to remove.public StructureViewModel getModel()
public boolean isEnabled(NodeProvider provider)
isEnabled in interface ProvidingTreeModel