// new style
Enumeration<String> argE = Collections.enumeration(Arrays.asList(args));
- ARG: while (argE.hasMoreElements())
+ while (argE.hasMoreElements())
{
String arg = argE.nextElement();
String argName = null;
{
// arg not found
Console.error("Argument '" + arg + "' not recognised. Ignoring.");
- continue ARG;
+ continue;
}
if (!a.hasOption(Opt.BOOLEAN) && negated)
{
// used "no" with a non-boolean option
Console.error("Argument '--" + NEGATESTRING + argName
+ "' not a boolean option. Ignoring.");
- continue ARG;
+ continue;
}
if (!a.hasOption(Opt.STRING) && equalPos > -1)
{
Console.error("Argument '--" + argName
+ "' does not expect a value (given as '" + arg
+ "'). Ignoring.");
- continue ARG;
+ continue;
}
if (!a.hasOption(Opt.LINKED) && linkedId != null)
{
Console.error("Argument '--" + argName
+ "' does not expect a linked id (given as '" + arg
+ "'). Ignoring.");
- continue ARG;
+ continue;
}
if (a.hasOption(Opt.STRING) && equalPos == -1)
// no value to take for arg, which wants a value
Console.error("Argument '" + a.getName()
+ "' requires a value, none given. Ignoring.");
- continue ARG;
+ continue;
}
val = argE.nextElement();
}
boolean first = true;
AlignFrame af;
- OPEN: for (String openFile : ArgParser.getValues(m, Arg.OPEN))
+ for (String openFile : ArgParser.getValues(m, Arg.OPEN))
{
if (openFile == null)
- continue OPEN;
+ continue;
+ argsWereParsed = true;
if (first)
{
first = false;
if (!(new File(openFile)).exists())
{
Console.warn("Can't find file '" + openFile + "'");
- continue OPEN;
}
}
}
AlignFrame af = afMap.get(id);
if (ArgParser.getArgValues(m, Arg.STRUCTURE) != null)
{
- STRUCTURE: for (String val : ArgParser.getValues(m, Arg.STRUCTURE))
+ for (String val : ArgParser.getValues(m, Arg.STRUCTURE))
{
SubVal subId = new SubVal(val);
SequenceI seq = getSpecifiedSequence(af, subId);
if (structureFile == null)
{
Console.warn("Not provided structure file with '" + val + "'");
- continue STRUCTURE;
+ continue;
}
if (!structureFile.exists())
{
Console.warn("Structure file '"
+ structureFile.getAbsoluteFile() + "' not found.");
- continue STRUCTURE;
+ continue;
}
Console.debug("Using structure file "