From: Ben Soares Date: Sat, 16 Sep 2023 15:56:54 +0000 (+0100) Subject: JAL-629 Fix a test and omit an incorrect error message for structureviewer=none X-Git-Tag: Release_2_11_4_0~174^2~17 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=24148ee604dd03ceaeab63c123f3afc5cc2a57a7;p=jalview.git JAL-629 Fix a test and omit an incorrect error message for structureviewer=none --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 0565111..9a85f1e 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -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 diff --git a/src/jalview/bin/argparser/Arg.java b/src/jalview/bin/argparser/Arg.java index 9bb5f38..b69ed61 100644 --- a/src/jalview/bin/argparser/Arg.java +++ b/src/jalview/bin/argparser/Arg.java @@ -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), diff --git a/test/jalview/bin/CommandsTest2.java b/test/jalview/bin/CommandsTest2.java index d6b6f3c..ae14c1a 100644 --- a/test/jalview/bin/CommandsTest2.java +++ b/test/jalview/bin/CommandsTest2.java @@ -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 { diff --git a/test/jalview/bin/commandsTest2.argfile1 b/test/jalview/bin/commandsTest2.argfile1 index ea3a1be..85eccd9 100644 --- a/test/jalview/bin/commandsTest2.argfile1 +++ b/test/jalview/bin/commandsTest2.argfile1 @@ -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