private static void addAvoidingDuplicates(DefaultActionGroup group,
                                            AnAction[] actions,
                                            Constraints constraints,
                                            AnAction[] existingActions) {
    HashSet<AnAction> visited = ContainerUtil.newHashSet(existingActions);
    for (AnAction action : actions) {
      if (action instanceof Separator || (!visited.contains(action) && !group.containsAction(action))) {
        group.add(action, constraints);
      }
    }
  }
private static void addAvoidingDuplicates(DefaultActionGroup group,
                                            AnAction[] actions,
                                            Constraints constraints,
                                            AnAction[] existingActions)