public class StructureViewComponent extends SimpleToolWindowPanel implements TreeActionsOwner, DataProvider, StructureView.Scrollable
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentjava.awt.Container.AccessibleAWTContainerjava.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyStructureView.ScrollableDisposable.ParentmyVerticallistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTKEY| Constructor and Description |
|---|
StructureViewComponent(FileEditor editor,
StructureViewModel structureViewModel,
Project project,
boolean showRootNode) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGroupByActions(DefaultActionGroup result) |
void |
centerSelectedRow() |
static void |
clearStructureViewState(Project project) |
protected ActionGroup |
createActionGroup() |
static TreeElementWrapper |
createWrapper(Project project,
TreeElement value,
TreeModel treeModel) |
void |
disableStoreState() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
Promise<AbstractTreeNode<?>> |
expandPathToElement(java.lang.Object element) |
java.awt.Dimension |
getCurrentSize() |
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier.
|
FileEditor |
getFileEditor()
Returns the editor whose structure is displayed in the structure view.
|
java.lang.String |
getHelpID() |
Project |
getProject() |
static JBIterable<java.lang.Object> |
getSelectedValues(javax.swing.JTree tree) |
javax.swing.JTree |
getTree() |
StructureViewModel |
getTreeModel() |
boolean |
isActionActive(java.lang.String name) |
boolean |
isDisposed() |
boolean |
navigateToSelectedElement(boolean requestFocus)
Selects the element which corresponds to the current cursor position in the editor
linked to the structure view.
|
void |
queueUpdate() |
void |
rebuild() |
<any> |
rebuildAndUpdate() |
static void |
registerAutoExpandListener(javax.swing.JTree tree,
StructureViewModel structureViewModel) |
static void |
registerPsiListener(Project project,
Disposable disposable,
java.lang.Runnable onChange) |
void |
restoreState()
Restores the state of the structure view (the expanded and selected elements)
from the user data of the file editor to which it is linked.
|
Promise<javax.swing.tree.TreePath> |
select(java.lang.Object element,
boolean requestFocus) |
void |
setActionActive(java.lang.String name,
boolean state) |
void |
setReferenceSizeWhileInitializing(java.awt.Dimension size) |
protected boolean |
showScrollToFromSourceActions() |
void |
showToolbar() |
void |
storeState()
Stores the state of the structure view (the expanded and selected elements)
in the user data of the file editor to which it is linked.
|
static java.lang.Object |
unwrapNavigatable(java.lang.Object o) |
static java.lang.Object |
unwrapValue(java.lang.Object o) |
static java.lang.Object |
unwrapWrapper(java.lang.Object o) |
getActions, getComponent, getContent, getToolbar, isToolbarVisible, isVertical, paintComponent, setContent, setProvideQuickActions, setToolbar, setVerticalgetComponentGraphics, getEmptyText, withEmptyTextandOpaque, andTransparent, getMaximumSize, getMinimumSize, getPreferredSize, withBackground, withBorder, withFont, withMaximumHeight, withMaximumWidth, withMinimumHeight, withMinimumWidth, withPreferredHeight, withPreferredSize, withPreferredWidthgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentgetName, isCycleRootpublic StructureViewComponent(FileEditor editor, StructureViewModel structureViewModel, Project project, boolean showRootNode)
public static void registerAutoExpandListener(javax.swing.JTree tree,
StructureViewModel structureViewModel)
protected boolean showScrollToFromSourceActions()
public FileEditor getFileEditor()
StructureViewgetFileEditor in interface StructureViewpublic void showToolbar()
public static void registerPsiListener(Project project, Disposable disposable, java.lang.Runnable onChange)
public Project getProject()
public javax.swing.JTree getTree()
public void queueUpdate()
public void rebuild()
public static JBIterable<java.lang.Object> getSelectedValues(javax.swing.JTree tree)
public void storeState()
StructureViewstoreState in interface StructureViewUserDataHolder.putUserData(com.intellij.openapi.util.Key, Object)public void disableStoreState()
disableStoreState in interface StructureViewpublic void restoreState()
StructureViewrestoreState in interface StructureViewUserDataHolder.getUserData(com.intellij.openapi.util.Key)protected ActionGroup createActionGroup()
protected void addGroupByActions(DefaultActionGroup result)
public Promise<AbstractTreeNode<?>> expandPathToElement(java.lang.Object element)
public Promise<javax.swing.tree.TreePath> select(java.lang.Object element, boolean requestFocus)
public void dispose()
Disposabledispose in interface Disposablepublic boolean isDisposed()
public void centerSelectedRow()
centerSelectedRow in interface StructureViewpublic void setActionActive(java.lang.String name,
boolean state)
setActionActive in interface TreeActionsOwnerpublic boolean isActionActive(java.lang.String name)
isActionActive in interface TreeActionsOwnerpublic static void clearStructureViewState(Project project)
public java.lang.Object getData(java.lang.String dataId)
DataProviderPlatformDataKeys class.getData in interface DataProvidergetData in class SimpleToolWindowPaneldataId - the data identifier for which the value is requested.public StructureViewModel getTreeModel()
getTreeModel in interface StructureViewpublic boolean navigateToSelectedElement(boolean requestFocus)
StructureViewnavigateToSelectedElement in interface StructureViewrequestFocus - if true, the structure view component also grabs the focus.public <any> rebuildAndUpdate()
public java.lang.String getHelpID()
public java.awt.Dimension getCurrentSize()
getCurrentSize in interface StructureView.Scrollablepublic void setReferenceSizeWhileInitializing(java.awt.Dimension size)
setReferenceSizeWhileInitializing in interface StructureView.Scrollablepublic static java.lang.Object unwrapValue(java.lang.Object o)
public static java.lang.Object unwrapNavigatable(java.lang.Object o)
public static java.lang.Object unwrapWrapper(java.lang.Object o)
public static TreeElementWrapper createWrapper(Project project, TreeElement value, TreeModel treeModel)