| | |
| | | // Write a line with the short and/or long identifiers that may be used |
| | | // for the argument. |
| | | Character shortID = a.getShortIdentifier(); |
| | | String longID = a.getLongIdentifier(); |
| | | if (shortID != null) |
| | | { |
| | | int currentLength = buffer.length(); |
| | |
| | | buffer.append("-"); |
| | | buffer.append(shortID.charValue()); |
| | | |
| | | if (a.needsValue()) |
| | | if (a.needsValue() && longID == null) |
| | | { |
| | | buffer.append(" "); |
| | | buffer.append(a.getValuePlaceholder()); |
| | | } |
| | | |
| | | String longID = a.getLongIdentifier(); |
| | | if (longID != null) |
| | | { |
| | | StringBuilder newBuffer = new StringBuilder(); |
| | | newBuffer.append("or --"); |
| | | newBuffer.append(", --"); |
| | | newBuffer.append(longID); |
| | | |
| | | if (a.needsValue()) |
| | |
| | | newBuffer.append(a.getValuePlaceholder()); |
| | | } |
| | | |
| | | int lineLength = (buffer.length() - currentLength) + 2 + |
| | | int lineLength = (buffer.length() - currentLength) + |
| | | newBuffer.length(); |
| | | if (lineLength > 80) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | buffer.append(" "); |
| | | buffer.append(newBuffer.toString()); |
| | | } |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | String longID = a.getLongIdentifier(); |
| | | if (longID != null) |
| | | { |
| | | buffer.append("--"); |