void () { if (myUsagePreviewPanel != null) { Disposer.dispose(myUsagePreviewPanel); } removeAll(); JScrollPane pane = ScrollPaneFactory.createScrollPane(myTree); if (isPreview()) { pane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT | SideBorder.RIGHT)); boolean vertical = myToolWindow.getAnchor() == ToolWindowAnchor.LEFT || myToolWindow.getAnchor() == ToolWindowAnchor.RIGHT; Splitter splitter = new Splitter(vertical, UsageViewSettings.getInstance().getPreviewUsagesSplitterProportion()); splitter.setFirstComponent(pane); myUsagePreviewPanel = new UsagePreviewPanel(myProject, new UsageViewPresentation()); myUsagePreviewPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT)); Disposer.register(this, myUsagePreviewPanel); splitter.setSecondComponent(myUsagePreviewPanel); add(splitter, BorderLayout.CENTER); } else { pane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT)); add(pane, BorderLayout.CENTER); } add(createToolbar().getComponent(), BorderLayout.WEST); myTree.getParent().setBackground(UIUtil.getTreeBackground()); revalidate(); }