airline icon indicating copy to clipboard operation
airline copied to clipboard

Support grouping options by category in help generators

Open rvesse opened this issue 9 years ago • 1 comments

Requires adding a new category property to the @Option annotation (or a separate @OptionCategory) annotation to state category information

Help generators would then use this additional optional information to group options together in their outputs

rvesse avatar Jul 07 '15 14:07 rvesse

Suggested plan:

  • Add category field to @Option annotation
  • Add class level @OptionCategory annotation (and @OptionCategories) which has the following signature:
    @OptionCategory(title = "Title", description = "Describes the category", id = "id")
    Where id is the value that should be placed in the category field of @Option
  • Discover and store @OptionCategory meta-data in CommandMetadata (and maybe GroupMetadata/GlobalMetadata as well?)
  • Provide a Comparator<OptionMetadata> that does a category based sort of options
  • Update help generator implementations to understand how to print options with their associated category descriptors

rvesse avatar Feb 01 '16 16:02 rvesse