import jalview.bin.Jalview;
import jalview.bin.argparser.Arg.Opt;
import jalview.util.FileUtils;
+import jalview.util.HttpUtils;
public class ArgParser
{
public ArgParser(List<String> args, boolean initsubstitutions,
boolean allowPrivate)
{
- // do nothing if there are no "--" args and some "-" args
+ // do nothing if there are no "--" args and (some "-" args || >0 arg is
+ // "open")
boolean d = false;
boolean dd = false;
for (String arg : args)
dd = true;
break;
}
- else if (arg.startsWith("-"))
+ else if (arg.startsWith("-") || arg.equals("open"))
{
d = true;
}
// single arg[i] and increment the defaultLinkedIdCounter so that each of
// these files is opened separately.
if (openEachInitialFilenames && !arg.startsWith(DOUBLEDASH)
- && !arg.startsWith("-") && new File(arg).exists())
+ && !arg.startsWith("-") && (new File(arg).exists()
+ || HttpUtils.startsWithHttpOrHttps(arg)))
{
arg = Arg.OPEN.argString();
}
// make NOACTION adjustments
// default and auto counter increments
- if (a == Arg.INCREMENT)
+ if (a == Arg.NEWFRAME)
{
defaultLinkedIdCounter++;
}