JAL-629 Fix a test and omit an incorrect error message for structureviewer=none improvement/JAL-4269_reduce_variants_of_common_subvalue_parameters
authorBen Soares <b.soares@dundee.ac.uk>
Sat, 16 Sep 2023 15:56:54 +0000 (16:56 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Sat, 16 Sep 2023 15:56:54 +0000 (16:56 +0100)
src/jalview/bin/Commands.java
src/jalview/bin/argparser/Arg.java
test/jalview/bin/CommandsTest2.java
test/jalview/bin/commandsTest2.argfile1

index 0565111..9a85f1e 100644 (file)
@@ -582,8 +582,11 @@ public class Commands
 
           if (structureViewer == null)
           {
-            addError("Failed to import and open structure view for file '"
-                    + structureFile + "'.");
+            if (!StringUtils.equalsIgnoreCase(sViewerName, "none"))
+            {
+              addError("Failed to import and open structure view for file '"
+                      + structureFile + "'.");
+            }
             continue;
           }
           try
index 9bb5f38..b69ed61 100644 (file)
@@ -139,7 +139,7 @@ public enum Arg
   TEMPFAC(Type.STRUCTURE,
           "Set the type of temperature factor. Possible values are:\n"
                   + "default,\n" + "plddt.",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
   STRUCTUREVIEWER(Type.STRUCTURE,
           "Set the structure viewer to use to open the 3D structure file specified in previous --structure to name. Possible values of name are:\n"
                   + "none,\n" + "jmol,\n" + "chimera,\n" + "chimerax,\n"
@@ -148,8 +148,8 @@ public enum Arg
   NOTEMPFAC(Type.STRUCTURE,
           "Do not show the temperature factor annotation for the preceding --structure.",
           Opt.UNARY, Opt.LINKED, Opt.ALLOWMULTIID, Opt.SECRET), // keep this
-                                                                // secret
-  // until it works!
+                                                                // secret until
+                                                                // it works!
   SHOWSSANNOTATIONS(Type.STRUCTURE, null, Opt.BOOLEAN, Opt.LINKED,
           Opt.ALLOWMULTIID),
 
index d6b6f3c..ae14c1a 100644 (file)
@@ -65,7 +65,8 @@ public class CommandsTest2
     String[] args = cmdLine.split("\\s+");
 
     CommandsTest.callJalviewMain(args);
-    while (Desktop.instance!=null && Desktop.instance.operationsAreInProgress())
+    while (Desktop.instance != null
+            && Desktop.instance.operationsAreInProgress())
     {
       try
       {
index ea3a1be..85eccd9 100644 (file)
@@ -1,9 +1,8 @@
---substitutions
 --append=examples/test_fab41.result/sample.a2m
 --showannotations
 --showssannotations
 --colour=gecos-flower
---structure=[viewer=jmol,tempfac=plddt,paematrix={dirname}/test_fab41_unrelaxed_rank_1_model_3_scores.json]{dirname}/test_fab41_unrelaxed_rank_1_model_3.pdb
+--structure=[structureviewer=jmol,tempfac=plddt,paematrix={dirname}/test_fab41_unrelaxed_rank_1_model_3_scores.json]{dirname}/test_fab41_unrelaxed_rank_1_model_3.pdb
 --structure={dirname}/test_fab41_unrelaxed_rank_2_model_4.pdb
 --structureviewer=jmol
 --paematrix={dirname}/test_fab41_unrelaxed_rank_2_model_4_scores.json
@@ -12,7 +11,7 @@
 --structureviewer=jmol
 --paematrix={dirname}/test_fab41_unrelaxed_rank_3_model_2_scores.json
 --tempfac=plddt
---structure=[viewer=none]{dirname}/test_fab41_unrelaxed_rank_4_model_5.pdb
+--structure=[structureviewer=none]{dirname}/test_fab41_unrelaxed_rank_4_model_5.pdb
 --paematrix={dirname}/test_fab41_unrelaxed_rank_4_model_5_scores.json
 --tempfac=plddt
 --structure={dirname}/test_fab41_unrelaxed_rank_5_model_1.pdb