public class TreeModelWrapper extends java.lang.Object implements StructureViewModel, ProvidingTreeModel
StructureViewModel.ElementInfoProvider, StructureViewModel.ExpandInfoProvider
Disposable.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()
StructureViewModel
getRoot
in interface StructureViewModel
getRoot
in interface TreeModel
public Grouper [] getGroupers()
TreeModel
getGroupers
in interface TreeModel
Grouper.EMPTY_ARRAY
public Sorter [] getSorters()
TreeModel
getSorters
in interface TreeModel
Sorter.EMPTY_ARRAY
public Filter [] getFilters()
TreeModel
getFilters
in interface TreeModel
Filter.EMPTY_ARRAY
public java.lang.Object getCurrentEditorElement()
StructureViewModel
getCurrentEditorElement
in interface StructureViewModel
public java.util.Collection<NodeProvider> getNodeProviders()
getNodeProviders
in interface ProvidingTreeModel
public static boolean isActive(TreeAction action, TreeActionsOwner actionsOwner)
public static boolean shouldRevert(TreeAction action)
public void addEditorPositionListener(FileEditorPositionListener listener)
StructureViewModel
addEditorPositionListener
in interface StructureViewModel
listener
- the listener to add.public void removeEditorPositionListener(FileEditorPositionListener listener)
StructureViewModel
removeEditorPositionListener
in interface StructureViewModel
listener
- the listener to remove.public void dispose()
StructureViewModel
dispose
in interface StructureViewModel
dispose
in interface Disposable
public boolean shouldEnterElement(java.lang.Object element)
shouldEnterElement
in interface StructureViewModel
public void addModelListener(ModelListener modelListener)
StructureViewModel
addModelListener
in interface StructureViewModel
modelListener
- the listener to add.public void removeModelListener(ModelListener modelListener)
StructureViewModel
removeModelListener
in interface StructureViewModel
modelListener
- the listener to remove.public StructureViewModel getModel()
public boolean isEnabled(NodeProvider provider)
isEnabled
in interface ProvidingTreeModel