Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-199

Improve HelpFormatter by making renderOptions() and renderWrappedText() public

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Not A Problem
    • 1.1, 1.2, 1.3
    • None
    • CLI-1.x
    • None

    Description

      Under certain circumstances it is usefull that HelpFormatter printing methods return a string buffer which can be used in further processing instead of direct printing to a PW or std.out.
      When having a closer look at the source one can easily retrieve string buffers with formatted text by changing the visibility of renderOptions() and renderWrappedText() from protected to public. This will make the "core" formatting methods available without adding additional functionallity to the HelpFormatter.

      Another option would be to add a set of print....() methods returning the SB instead of printing its content.

      Attachments

        Activity

          People

            Unassigned Unassigned
            prong gg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: