void () { DefaultActionGroup group = new MyActionGroup(); if (NotificationsConfigurationImpl.getInstanceImpl().isRegistered(myNotification.getGroupId())) { group.add(new DumbAwareAction(IdeBundle.message("notification.settings.action.text")) { @Override public void actionPerformed(@NotNull AnActionEvent event) { doShowSettings(); } }); group.addSeparator(); } //noinspection DialogTitleCapitalization group.add(new DumbAwareAction(IdeBundle.message("notifications.toolwindow.dont.show.again.for.this.project")) { @Override public void actionPerformed(@NotNull AnActionEvent event) { handleDoNotAsk(true); } }); //noinspection DialogTitleCapitalization group.add(new DumbAwareAction(IdeBundle.message("notifications.toolwindow.dont.show.again")) { @Override public void actionPerformed(@NotNull AnActionEvent event) { handleDoNotAsk(false); } }); ListPopup popup = JBPopupFactory.getInstance() .createActionGroupPopup(null, group, DataManager.getInstance().getDataContext(myMoreButton), true, null, -1); Disposer.register(myBalloon, popup); popup.showUnderneathOf(myMoreButton); }