8000 Please add support for option grouping · Issue #605 · cbeust/jcommander · GitHub
[go: up one dir, main page]

Skip to content

Please add support for option grouping #605

@lukehutch

Description

@lukehutch

It would be awesome if there was a way to group options under subheadings, either for topically grouping options, or for showing which options are true when the program is operating in one of several different modes.

Probably the best way to do this using the current declarative syntax is to add an int[] group() default {} to the annotation interface, which would then give you the ability to say group = 3 or group = {1, 3} in an annotation. Group 0 would appear at the top, before any subheadings, and if there are any options belonging to groups 1 or above, those should be listed, grouped, below that.

You just need a way to specify subheadings for the groups. This could be done with the JCommander builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0