List of usage examples for org.apache.commons.cli HelpFormatter setNewLine
public void setNewLine(String newline)
From source file:org.rhq.server.control.ControlCommand.java
public void printUsage() { Options options = getOptions();//from w w w . j a va2s. com HelpFormatter helpFormatter = new HelpFormatter(); String header = "\n" + getDescription() + "\n\n"; String syntax; if (options.getOptions().isEmpty()) { syntax = "rhqctl " + getName(); } else { syntax = "rhqctl " + getName() + " [options]"; } helpFormatter.setNewLine("\n"); helpFormatter.printHelp(syntax, header, options, null); // we can't pass this as the last argument to printHelp above // because it throws an exception if the string is too long. String readmeContent = getReadmeContent(); if (readmeContent != null) { System.out.println(readmeContent); } }