AbstractAddGroup (boolean fromPopup) { return new AbstractAddGroup(JavaUiBundle.message("add.new.header.text")) { @Override public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) { List<ArtifactType> types = ArtifactType.getAllTypes(); final AnAction[] actions = new AnAction[types.size()]; for (int i = 0; i < types.size(); i++) { actions[i] = createAddArtifactAction(types.get(i)); } return actions; } }; }