ListPopup (@NotNull List<OpenShellAction> shells, @NotNull List<OpenShellAction> wsl, @NotNull List<AnAction> customActions, @NotNull DataContext dataContext) { DefaultActionGroup group = new DefaultActionGroup(); group.addAll(shells); group.addAll(wsl); group.addAll(customActions); if (shells.size() + wsl.size() + customActions.size() > 0) { group.addSeparator(); } group.add(new TerminalSettingsAction()); return JBPopupFactory.getInstance().createActionGroupPopup(null, group, dataContext, false, true, true, null, -1, null); }