Skip to content

provide API to use a custom Layout in usage help message #748

@remkop

Description

@remkop

The current Help implementation does not make it easy for applications to provide a custom Layout implementation.

There is a public method Help.createDefaultLayout(), but this is not used.
The method that is actually used internally: Help.createLayout(int) is private and cannot be overridden by Help subclasses.

One way to fix this is to change the implementation of Help.createDefaultLayout() to call createLayout with the result of calcLongOptionColumnWidth() instead of with the constant value Help.defaultOptionsColumnWidth. All places that currently call createLayout(calcLongOptionColumnWidth()) can then be replaced with calls to createDefaultLayout().

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions