airlift/airline — pull request #28 by jontodd (2013-12-30 02:02:50+00:00)
Title: Missing required option doesn't throw

This is a proposed fix for: https://github.com/airlift/airline/issues/22

This approach introduces a ParseResult object which allows for the collection of multiple parse errors from the user input
and then provides this back to the caller to decide what to do. E.G. send the user the to the help dialog.

This keeps the existing API and fits with the desire to keep the parsing logic agnostic to the details of the HelpOption.

The existing pattern still fails fast with an exception:

```java
MyCommand command = SingleCommand.singleCommand(MyCommand.class).parse(args);
```

This fix introduces the following pattern from the caller's perspective:

```java
ParseResult parseResult = new ParseResult();
MyCommand command = SingleCommand.singleCommand(MyCommand.class).parse(args, parseResult);
command.helpOption.runOrShowHelp(parseResult, command);
```

The call to runOrShowHelp will:
* Run the command if there are no parse errors and help has not been requsted
* Will display help if it is requested regardless of whether there are parse errors
* Will display parse errors and help when there are parse errors