Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
remkop opened this issue Jun 24, 2019 · 0 comments
Closed

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

remkop opened this issue Jun 24, 2019 · 0 comments
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Jun 24, 2019

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().

@remkop remkop added this to the 4.0 milestone Jun 24, 2019
@remkop remkop closed this as completed in c72c0d4 Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant