void (@NotNull DefaultActionGroup group, @Nullable List<? extends AnAction> actions, boolean prependSeparator) { if (actions == null || actions.isEmpty()) return; if (prependSeparator) { group.addSeparator(); } AnAction[] children = group.getChildren(null); for (AnAction action : actions) { if (action instanceof Separator || !ArrayUtil.contains(action, children)) { group.add(action); } } }