Opt.UNARY, Opt.MULTI, Opt.NOACTION, Opt.INCREMENTDEFAULTCOUNTER),
SUBSTITUTIONS(Type.FLOW,
"The following argument values allow (or don't allow) subsituting filename parts. This is initially true. Valid substitutions are {basename} - the filename-without-extension of the currently --opened file (or first --appended file),\n"
- + "{dirname}, - the directory (folder) name of the currently --opened file (or first --appended file),\n"
+ + "{dirname} - the directory (folder) name of the currently --opened file (or first --appended file),\n"
+ "{argfilebasename} - the filename-without-extension of the current --argfile,\n"
+ "{argfiledirname} - the directory (folder) name of the current --argfile,\n"
+ "{n} - the value of the index counter (starting at 0).\n"
while (line.length() > descLength)
{
int splitIndex = line.lastIndexOf(" ", descLength);
- if (splitIndex > descLength)
- {
- break;
- }
- else
- {
- splitDescLinesList.add(line.substring(0, splitIndex));
- line = line.substring(splitIndex + 1);
- }
+ splitDescLinesList.add(line.substring(0, splitIndex));
+ line = line.substring(splitIndex + 1);
}
splitDescLinesList.add(line);
}
while (splitDescLines.hasNext())
{
if (first)
+ {
sb.append(ARGDESCRIPTIONSEPARATOR);
+ }
else
+ {
sb.append(String.format("%-"
+ (maxArgLength + ARGDESCRIPTIONSEPARATOR.length()) + "s",
""));
+ }
sb.append(splitDescLines.next());
sb.append(System.lineSeparator());
first = false;