reworked Option.toString()
This commit is contained in:
parent
c6daefd033
commit
cc15618dca
|
@ -146,13 +146,20 @@ public class CmdOptions {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String ret = name + " (";
|
String ret = name + " (";
|
||||||
for (String s : cmd) {
|
for (String s : cmd) {
|
||||||
ret += s + ", ";
|
ret += optionChar + s + ", ";
|
||||||
}
|
}
|
||||||
ret += ")"
|
for (String s : cmdLong) {
|
||||||
+ (defaultParameter != null ? ": default="
|
ret += optionChar + s + ", ";
|
||||||
+ defaultParameter : "")
|
}
|
||||||
+ (description != null ? "\n\t\t" + description : "");
|
ret += ")";
|
||||||
if (possibleParams != null) {
|
if (defaultParameter.size() > 0) {
|
||||||
|
ret += ": default=";
|
||||||
|
for (String s : defaultParameter) {
|
||||||
|
ret += s + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ret += (description != null ? "\n\t\t" + description : "");
|
||||||
|
if (possibleParams.size() > 0) {
|
||||||
boolean start = true;
|
boolean start = true;
|
||||||
ret += "\n\t\t(Possible parameters: ";
|
ret += "\n\t\t(Possible parameters: ";
|
||||||
for (String s : possibleParams) {
|
for (String s : possibleParams) {
|
||||||
|
|
Loading…
Reference in New Issue