// get bootstrap properties (mainly for the logger level)
Properties bootstrapProperties = Cache
- .bootstrapProperties(bootstrapArgs.get(Arg.PROPS));
+ .bootstrapProperties(bootstrapArgs.getValue(Arg.PROPS));
// report Jalview version
Cache.loadBuildProperties(
});
String usrPropsFile = bootstrapArgs.contains(Arg.PROPS)
- ? bootstrapArgs.get(Arg.PROPS)
+ ? bootstrapArgs.getValue(Arg.PROPS)
: aparser.getValue("props");
// if usrPropsFile == null, loadProperties will use the Channel
// preferences.file
}
// new CLI
- headlessArg = isHeadless(bootstrapArgs);
+ headlessArg = bootstrapArgs.isHeadless();
if (headlessArg)
{
System.setProperty("java.awt.headless", "true");
// allow https handshakes to download intermediate certs if necessary
System.setProperty("com.sun.security.enableAIAcaIssuers", "true");
- String jabawsUrl = bootstrapArgs.get(Arg.JABAWS);
+ String jabawsUrl = bootstrapArgs.getValue(Arg.JABAWS);
if (jabawsUrl == null)
jabawsUrl = aparser.getValue("jabaws");
if (jabawsUrl != null)
if (!(headless || headlessArg))
{
- Desktop.nosplash = "false".equals(bootstrapArgs.get(Arg.SPLASH))
+ Desktop.nosplash = "false".equals(bootstrapArgs.getValue(Arg.SPLASH))
|| aparser.contains("nosplash")
|| Cache.getDefault("SPLASH", "true").equals("false");
desktop = new Desktop();
if ((!aparser.contains("nonews")
&& Cache.getProperty("NONEWS") == null
- && !"false".equals(bootstrapArgs.get(Arg.NEWS)))
- || "true".equals(bootstrapArgs.get(Arg.NEWS)))
+ && !"false".equals(bootstrapArgs.getValue(Arg.NEWS)))
+ || "true".equals(bootstrapArgs.getValue(Arg.NEWS)))
{
desktop.checkForNews();
}
System.out.println("[TESTOUTPUT] arg "
+ (yes ? a.argString() : a.negateArgString()) + " was set");
}
-
- private static boolean isHeadless(BootstrapArgs bootstrapArgs)
- {
- if (bootstrapArgs == null)
- {
- return false;
- }
- boolean isHeadless = false;
- if (bootstrapArgs.contains(Arg.GUI))
- {
- isHeadless = !bootstrapArgs.getBoolean(Arg.GUI);
- }
- else if (bootstrapArgs.contains(Arg.HEADLESS))
- {
- isHeadless = bootstrapArgs.getBoolean(Arg.HEADLESS);
- }
- else if (bootstrapArgs.argsHaveOption(Opt.OUTPUTFILE))
- {
- isHeadless = true;
- }
- return isHeadless;
- }
}