headless = h;
boolean theseArgsWereParsed = false;
- if (argParser != null && argParser.linkedIds() != null)
+ if (argParser != null && argParser.getLinkedIds() != null)
{
- for (String id : argParser.linkedIds())
+ for (String id : argParser.getLinkedIds())
{
- ArgValuesMap avm = argParser.linkedArgs(id);
+ ArgValuesMap avm = argParser.getLinkedArgs(id);
theseArgsWereParsed = true;
if (id == null)
{
protected boolean processLinked(String id)
{
boolean theseArgsWereParsed = false;
- ArgValuesMap avm = argParser.linkedArgs(id);
+ ArgValuesMap avm = argParser.getLinkedArgs(id);
if (avm == null)
return true;
for (ArgValue av : openAvList)
{
Arg a = av.getArg();
+ SubVals sv = av.getSubVals();
String openFile = av.getValue();
if (openFile == null)
continue;
}
af = afMap.get(id);
+ // When to open a new AlignFrame
if (af == null || "true".equals(av.getSubVal("new"))
|| a == Arg.OPEN || format == FileFormat.Jalview)
{
af.setAnnotationsVisibility(showAnnotations, false, true);
// wrap alignment?
- if (avm.getBoolean(Arg.WRAP))
- {
- af.getCurrentView().setWrapAlignment(true);
- }
+ boolean wrap = ArgParser.getFromSubValArgOrPref(avm, Arg.WRAP, sv,
+ null, "WRAP_ALIGNMENT", false);
+ af.getCurrentView().setWrapAlignment(wrap);
// colour aligment?
- if (avm.containsArg(Arg.COLOUR))
+ String colour = ArgParser.getFromSubValArgOrPref(avm, Arg.COLOUR,
+ sv, null, "DEFAULT_COLOUR_PROT", "");
+
+ if ("" != colour)
{
- af.changeColour_actionPerformed(avm.getValue(Arg.COLOUR));
+ af.changeColour_actionPerformed(colour);
}
// change alignment frame title
- if (avm.containsArg(Arg.TITLE))
- af.setTitle(avm.getValue(Arg.TITLE));
+ String title = ArgParser.getFromSubValArgOrPref(avm, Arg.TITLE,
+ sv, null, null, null);
+ if (title != null)
+ af.setTitle(title);
// show secondary structure annotations?
boolean showSSAnnotations = ArgParser.getFromSubValArgOrPref(avm,
{
Console.debug(
"Opening '" + openFile + "' in existing alignment frame");
- af.getCurrentView().addFile(new File(openFile), format, false);
+ DataSourceType dst = HttpUtils.startsWithHttpOrHttps(openFile)
+ ? DataSourceType.URL
+ : DataSourceType.FILE;
+ FileLoader fileLoader = new FileLoader(!headless);
+ fileLoader.LoadFile(af.getCurrentView(), openFile, dst, null,
+ false);
}
Console.debug("Command " + Arg.APPEND + " executed successfully!");
protected boolean processImages(String id)
{
- ArgValuesMap avm = argParser.linkedArgs(id);
+ ArgValuesMap avm = argParser.getLinkedArgs(id);
AlignFrame af = afMap.get(id);
if (af == null)