void (@NotNull final AnActionEvent e) { @NonNls final String delim = "&nbsp;-&gt;&nbsp;"; final StringBuffer buf = new StringBuffer(); processDependencies(getSelectedScope(myLeftTree), getSelectedScope(myRightTree), path -> { if (buf.length() > 0) buf.append("<br>"); buf.append(StringUtil.join(path, psiFile -> psiFile.getName(), delim)); return true; }); final JEditorPane pane = new JEditorPane(UIUtil.HTML_MIME, XmlStringUtil.wrapInHtml(buf)); pane.setForeground(JBColor.foreground()); pane.setBackground(HintUtil.getInformationColor()); pane.setOpaque(true); final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(pane); final Dimension dimension = pane.getPreferredSize(); scrollPane.setMinimumSize(new Dimension(dimension.width, dimension.height + 20)); scrollPane.setPreferredSize(new Dimension(dimension.width, dimension.height + 20)); JBPopupFactory.getInstance().createComponentPopupBuilder(scrollPane, pane).setTitle(LangBundle.message("popup.title.dependencies")) .setMovable(true).createPopup().showInBestPositionFor(e.getDataContext()); }