Draft support for multiple help output formats.
- Added a HelpWriterContext class. An instance is now passed to all
methods that write help text. In addition to keeping track of the
output format, it also allows other context information to be kept
(e.g., for formatting reasonable cross-references; earlier I had to
remove those that were in the selection help because static text was
not appropriate for all situations).
- Moved current output format specific methods to be members of this
class.
- Adjusted using methods to work as before for console output, but did
not yet implement any additional output formats. All methods with
console-specific code now throw a NotImplementedError to make it easy
to find them once #969 is decided.
Once there has been some discussion on the markup and output formats
in #969, this approach can be extended to actually implement it.
No matter which of the alternatives is chosen, the parts in this commit
are useful, but the decisions made in #969 affect the direction to which
the implementation should be extended.
Prerequisite for #969.
Change-Id: I33cd59e6f3b5450db99e0e1afba4a2d1b9e30e29
22 files changed: