/** * Format usage output. * * @return the formatter */ protected HelpFormatter getHelpFormatter() { return new CLIHelpFormatter(); }
@SuppressWarnings("unchecked") @Override protected StringBuffer renderOptions(final StringBuffer sb, final int width, final Options options, final int leftPad, final int descPad) { final String lpad = this.createPadding(leftPad); final String dpad = this.createPadding(8); // we use a fixed value instead of descPad Collections.sort(optList, this.getOptionComparator()); optBuf.append(lpad).append(" ").append(this.getLongOptPrefix()).append(option.getLongOpt()); } else { optBuf.append(lpad).append(this.getOptPrefix()).append(option.getOpt()); optBuf.append(',').append(this.getLongOptPrefix()).append(option.getLongOpt()); sb.append(optBuf.toString()).append(this.getNewLine()); this.renderWrappedText(sb, width, dpad.length(), optBuf.toString()); sb.append(this.getNewLine()); sb.append(this.getNewLine());
@SuppressWarnings("unchecked") @Override protected StringBuffer renderOptions(final StringBuffer sb, final int width, final Options options, final int leftPad, final int descPad) { final String lpad = this.createPadding(leftPad); final String dpad = this.createPadding(8); // we use a fixed value instead of descPad Collections.sort(optList, this.getOptionComparator()); optBuf.append(lpad).append(" ").append(this.getLongOptPrefix()).append(option.getLongOpt()); } else { optBuf.append(lpad).append(this.getOptPrefix()).append(option.getOpt()); optBuf.append(',').append(this.getLongOptPrefix()).append(option.getLongOpt()); sb.append(optBuf.toString()).append(this.getNewLine()); this.renderWrappedText(sb, width, dpad.length(), optBuf.toString()); sb.append(this.getNewLine()); sb.append(this.getNewLine());
protected HelpFormatter getHelpFormatter() { return new CLIHelpFormatter(); }
@Override protected HelpFormatter getHelpFormatter() { final HelpFormatter helpFormatter = new CLIHelpFormatter(); helpFormatter.setOptionComparator(new OptionComparator()); return helpFormatter; }