Component (@NotNull JRootPane pane) { if (pane instanceof IdeRootPane ideRootPane && !(ideRootPane instanceof LightEditCompatible)) { JComponent component = ideRootPane.getToolWindowPane().getDocumentComponent(); return component == null || !component.isShowing() ? pane : component; } Component tabWrapper = UIUtil.findComponentOfType(pane, TabbedPaneWrapper.TabWrapper.class); if (tabWrapper != null && tabWrapper.isShowing()) { return tabWrapper; } EditorsSplitters splitters = UIUtil.findComponentOfType(pane, EditorsSplitters.class); return splitters == null || !splitters.isShowing() ? pane : splitters; }