JAL-629 Changed --newframe and --allframes to --new and --all. More consistent -...
[jalview.git] / src / jalview / bin / Commands.java
index 90eb45c..d1929f9 100644 (file)
@@ -90,7 +90,10 @@ public class Commands
         ArgValuesMap avm = argParser.getLinkedArgs(id);
         theseArgsWereParsed = true;
         theseArgsWereParsed &= processLinked(id);
+        boolean processLinkedOkay = theseArgsWereParsed;
         theseArgsWereParsed &= processImages(id);
+        if (processLinkedOkay)
+          theseArgsWereParsed &= processOutput(id);
 
         // close ap
         if (avm.getBoolean(Arg.CLOSE))
@@ -646,6 +649,31 @@ public class Commands
     return true;
   }
 
+  protected boolean processOutput(String id)
+  {
+    ArgValuesMap avm = argParser.getLinkedArgs(id);
+    AlignFrame af = afMap.get(id);
+
+    if (af == null)
+    {
+      Console.warn("Did not have an alignment window for id=" + id);
+      return false;
+    }
+
+    if (avm.containsArg(Arg.OUTPUT))
+    {
+      for (ArgValue av : avm.getArgValueList(Arg.OUTPUT))
+      {
+        String val = av.getValue();
+        SubVals subVal = av.getSubVals();
+        String type = null; // default
+        String fileName = subVal.getContent();
+        File file = new File(fileName);
+      }
+    }
+    return true;
+  }
+
   private SequenceI getSpecifiedSequence(AlignFrame af, SubVals subId)
   {
     if (subId == null)