JComponent () { DefaultActionGroup group = new DefaultActionGroup(); group.setPopup(true); group.add(new DumbAwareAction(IdeBundle.message("plugins.review.action.copy.link.text")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { String url = ApplicationInfoImpl.getShadowInstance().getPluginManagerUrl() + myPluginId + "/reviews#review=" + URLUtil.encodeURIComponent(myCommendId); CopyPasteManager.getInstance().setContents(new StringSelection(url)); } }); Presentation presentation = new Presentation(); presentation.setIcon(AllIcons.Actions.More); presentation.putClientProperty(ActionButton.HIDE_DROPDOWN_ICON, Boolean.TRUE); return new ActionButton(group, presentation, ActionPlaces.UNKNOWN, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE) { @Override protected @NotNull JBPopup createAndShowActionGroupPopup(@NotNull ActionGroup actionGroup, @NotNull AnActionEvent event) { myShowPopup = true; JBPopup popup = super.createAndShowActionGroupPopup(actionGroup, event); popup.addListener(new JBPopupListener() { @Override public void onClosed(@NotNull LightweightWindowEvent event) { myShowPopup = false; ApplicationManager.getApplication().invokeLater(() -> myMoreButton.setVisible(myState == EventHandler.SelectionType.HOVER)); } }); return popup; } }; }