public final class StructureViewFactoryImpl extends StructureViewFactoryEx implements PersistentStateComponent<StructureViewFactoryImpl.State>
Modifier and Type | Class and Description |
---|---|
static class |
StructureViewFactoryImpl.State |
Constructor and Description |
---|
StructureViewFactoryImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupForNextTest() |
java.util.Collection<java.lang.String> |
collectActiveActions() |
StructureView |
createStructureView(FileEditor fileEditor,
StructureViewModel treeModel,
Project project)
Creates a structure view component instance for the specified editor.
|
StructureView |
createStructureView(FileEditor fileEditor,
StructureViewModel treeModel,
Project project,
boolean showRootNode)
Creates a structure view component instance for the specified editor.
|
java.util.Collection<StructureViewExtension> |
getAllExtensions(java.lang.Class<? extends PsiElement> type) |
StructureViewFactoryImpl.State |
getState() |
StructureViewWrapper |
getStructureViewWrapper() |
void |
initToolWindow(ToolWindowEx toolWindow) |
boolean |
isActionActive(java.lang.String name) |
void |
loadState(StructureViewFactoryImpl.State state)
This method is called when new component state is loaded.
|
void |
runWhenInitialized(java.lang.Runnable runnable) |
void |
setActiveAction(java.lang.String name,
boolean state) |
getInstanceEx
getInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public StructureViewFactoryImpl(Project project)
public StructureViewWrapper getStructureViewWrapper()
getStructureViewWrapper
in class StructureViewFactoryEx
public StructureViewFactoryImpl.State getState()
getState
in interface PersistentStateComponent<StructureViewFactoryImpl.State>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(StructureViewFactoryImpl.State state)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<StructureViewFactoryImpl.State>
state
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public void initToolWindow(ToolWindowEx toolWindow)
public java.util.Collection<StructureViewExtension> getAllExtensions(java.lang.Class<? extends PsiElement> type)
getAllExtensions
in class StructureViewFactoryEx
public void setActiveAction(java.lang.String name, boolean state)
setActiveAction
in class StructureViewFactoryEx
public java.util.Collection<java.lang.String> collectActiveActions()
public boolean isActionActive(java.lang.String name)
isActionActive
in class StructureViewFactoryEx
public void runWhenInitialized(java.lang.Runnable runnable)
runWhenInitialized
in class StructureViewFactoryEx
public StructureView createStructureView(FileEditor fileEditor, StructureViewModel treeModel, Project project)
StructureViewFactory
createStructureView
in class StructureViewFactory
fileEditor
- the editor to which the structure view is linked.treeModel
- the model defining the data shown in the structure view.project
- the project containing the file for which the structure view is requested.public StructureView createStructureView(FileEditor fileEditor, StructureViewModel treeModel, Project project, boolean showRootNode)
StructureViewFactory
createStructureView
in class StructureViewFactory
fileEditor
- the editor to which the structure view is linked.treeModel
- the model defining the data shown in the structure view.project
- the project containing the file for which the structure view is requested.showRootNode
- pass false
if root node of the structure built should not actually be shown in result tree.public void cleanupForNextTest()