JPanel () { if (myProject == null) return super.createSuggestionsPanel(); JScrollPane resultScroll = createListPane(); myUsageViewPresentation = new UsageViewPresentation(); myUsagePreviewPanel = new UsagePreviewPanel(myProject, myUsageViewPresentation, true) { @Override public Dimension getPreferredSize() { return new Dimension(myHeader.getComponent().getWidth(), Math.max(getHeight(), getLineHeight() * 10)); } }; updatePreviewVisibility(myHeader.getSelectedTab()); ApplicationManager.getApplication().getMessageBus().connect(this).subscribe( SETabSwitcherListener.Companion.getSE_TAB_TOPIC(), new SETabSwitcherListener() { @Override public void tabSwitched(@NotNull SETabSwitcherListener.SETabSwitchedEvent event) { updatePreviewVisibility(event.getNewTab()); } }); ApplicationManager.getApplication().getMessageBus().connect(this).subscribe( SEHeaderActionListener.Companion.getSE_HEADER_ACTION_TOPIC(), new SEHeaderActionListener() { @Override public void performed(@NotNull SEHeaderActionListener.SearchEverywhereActionEvent event) { if (event.getActionID().equals("Preview")) { updatePreviewVisibility(myHeader.getSelectedTab()); } } }); OnePixelSplitter splitter = new OnePixelSplitter(true, .33f); splitter.setSplitterProportionKey(SPLITTER_SERVICE_KEY); splitter.getDivider().setBackground(OnePixelDivider.BACKGROUND); splitter.setFirstComponent(resultScroll); splitter.setSecondComponent(myUsagePreviewPanel); JPanel panel = new JPanel(new BorderLayout()); panel.add(splitter, BorderLayout.CENTER); return createFooterPanel(panel); }