void (@NotNull JBTabbedPane pane) { JPanel topPanel = new Wrapper(new BorderLayout(0, JBUI.scale(5))); topPanel.setBorder(JBUI.Borders.empty(16, 16, 12, 16)); LinkPanel newReviewLink = new LinkPanel(topPanel, true, false, null, BorderLayout.WEST); newReviewLink.showWithBrowseUrl(IdeBundle.message("plugins.new.review.action"), false, () -> { PluginId pluginId = requireNonNull(myPlugin).getPluginId(); IdeaPluginDescriptor installedPlugin = PluginManagerCore.getPlugin(pluginId); return MarketplaceUrls.getPluginWriteReviewUrl(pluginId, installedPlugin != null ? installedPlugin.getVersion() : null); }); JPanel notePanel = new Wrapper(ListLayout.horizontal(JBUI.scale(5), ListLayout.Alignment.CENTER, ListLayout.GrowPolicy.NO_GROW)); LinkPanel noteLink = new LinkPanel(notePanel, true, true, null, null); noteLink.showWithBrowseUrl(IdeBundle.message("plugins.review.note"), IdeBundle.message("plugins.review.note.link"), false, () -> MarketplaceUrls.getPluginReviewNoteUrl()); topPanel.add(notePanel, BorderLayout.SOUTH); JPanel reviewsPanel = new OpaquePanel(new BorderLayout(), PluginManagerConfigurable.MAIN_BG_COLOR); reviewsPanel.add(topPanel, BorderLayout.NORTH); myReviewPanel = new ReviewCommentListContainer(); reviewsPanel.add(myReviewPanel); myReviewNextPageButton = new JButton(IdeBundle.message("plugins.review.panel.next.page.button")); myReviewNextPageButton.setOpaque(false); reviewsPanel.add(new Wrapper(new FlowLayout(), myReviewNextPageButton), BorderLayout.SOUTH); myReviewNextPageButton.addActionListener(e -> { myReviewNextPageButton.setIcon(AnimatedIcon.Default.INSTANCE); myReviewNextPageButton.setEnabled(false); ListPluginComponent component = myShowComponent; PluginNode installedNode = getInstalledPluginMarketplaceNode(); PluginNode node = installedNode != null ? installedNode : (PluginNode)component.getPluginDescriptor(); PageContainer<PluginReviewComment> reviewComments = requireNonNull(node.getReviewComments()); int page = reviewComments.getNextPage(); ProcessIOExecutorService.INSTANCE.execute(() -> { List<PluginReviewComment> items = MarketplaceRequests.getInstance().loadPluginReviews(node, page); ApplicationManager.getApplication().invokeLater(() -> { if (myShowComponent != component) { return; } if (items != null) { reviewComments.addItems(items); myReviewPanel.addComments(items); myReviewPanel.fullRepaint(); } myReviewNextPageButton.setIcon(null); myReviewNextPageButton.setEnabled(true); myReviewNextPageButton.setVisible(reviewComments.isNextPage()); }, ModalityState.stateForComponent(component)); }); }); addTabWithoutBorders(pane, () -> { pane.add(IdeBundle.message("plugins.configurable.reviews.tab.name"), createScrollPane(reviewsPanel)); }); }