JAL-629 Changed --newframe and --allframes to --new and --all. More consistent -...
[jalview.git] / src / jalview / bin / argparser / ArgParser.java
index f1781fc..42868ae 100644 (file)
@@ -98,8 +98,9 @@ public class ArgParser
   private static final String ARGFILEDIRNAME = "{argfiledirname}";
 
   // flag to say whether {n} subtitutions in output filenames should be made.
-  // Turn on and off with --subs and --nosubs
-  private boolean substitutions = false;
+  // Turn on and off with --substitutions and --nosubstitutions
+  // Start with it on
+  private boolean substitutions = true;
 
   // flag to say whether the default linkedId is the current default linked id
   // or ALL linkedIds
@@ -346,11 +347,7 @@ public class ArgParser
 
         // make NOACTION adjustments
         // default and auto counter increments
-        if (a == Arg.NEWFRAME)
-        {
-          defaultLinkedIdCounter++;
-        }
-        else if (a == Arg.NPP)
+        if (a == Arg.NPP)
         {
           linkedIdAutoCounter++;
         }
@@ -366,11 +363,18 @@ public class ArgParser
         {
           argFile = null;
         }
-        else if (a == Arg.ALLFRAMES)
+        else if (a == Arg.ALL)
         {
           allLinkedIds = !negated;
         }
 
+        // this is probably only Arg.NEW and Arg.OPEN
+        if (a.hasOption(Opt.INCREMENTDEFAULTCOUNTER))
+        {
+          // use the next default prefixed OPENLINKEDID
+          defaultLinkedId(true);
+        }
+
         String autoCounterString = null;
         boolean usingAutoCounterLinkedId = false;
         String defaultLinkedId = defaultLinkedId(false);
@@ -379,11 +383,6 @@ public class ArgParser
         {
           if (linkedId == null)
           {
-            if (a.hasOption(Opt.INCREMENTDEFAULTCOUNTER))
-            {
-              // use the next default prefixed OPENLINKEDID
-              defaultLinkedId = defaultLinkedId(true);
-            }
             if (allLinkedIds && a.hasOption(Opt.ALLOWALL))
             {
               linkedId = MATCHALLLINKEDIDS;
@@ -419,7 +418,7 @@ public class ArgParser
           }
         }
 
-        // do not continue for NOACTION args
+        // do not continue in this block for NOACTION args
         if (a.hasOption(Opt.NOACTION))
           continue;