// }
public static Jalview getInstance()
{
+ System.out.println("Hello, MW!!!!!!!!!!!!");
return (Jalview) ApplicationSingletonProvider
.getInstance(Jalview.class);
}
if (aparser.contains("nodisplay") || aparser.contains("nogui")
|| aparser.contains("headless"))
{
+ // BH Is this necessary? Seems like a hack; was removed for applet branch
System.setProperty("java.awt.headless", "true");
headless = true;
}
+ if ("true".equals(System.getProperty("java.awt.headless")))
+ {
+ headless = true;
+ }
// <<?
// anything else!
}
defs = aparser.getValue("setprop");
}
- if (System.getProperty("java.awt.headless") != null
- && System.getProperty("java.awt.headless").equals("true"))
- {
- headless = true;
- }
System.setProperty("http.agent",
"Jalview Desktop/" + Cache.getDefault("VERSION", "Unknown"));
try
System.out.println(
"Creating image map: " + imageFile.getAbsolutePath());
continue;
- }
- if (!Platform.isJS()) /** @j2sIgnore */
- {
- // skipping outputFormat?
- System.out.println("Unknown arg: " + outputFormat);
- fname = new File(aparser.nextValue()).getAbsolutePath();
- af.saveAlignment(fname, format);
- if (af.isSaveAlignmentSuccessful())
+ default:
+ format = FileFormats.getInstance().forName(outputFormat);
+ if (format == null)
{
- System.out.println(
- "Written alignment in " + format + " format to " + fname);
+ System.out.println("Invalid file format: " + outputFormat);
+ break;
}
- else
+ fname = new File(aparser.nextValue()).getAbsolutePath();
+ af.saveAlignment(fname, format);
+ if (!af.isSaveAlignmentSuccessful())
{
System.out.println("Error writing file " + fname + " in " + format
+ " format!!");
+ break;
}
+ continue;
}
+ System.out.println("Unknown arg: " + outputFormat);
break;
}
while (aparser.getSize() > 0)