JAL-629 Fix a test and omit an incorrect error message for structureviewer=none
[jalview.git] / src / jalview / bin / argparser / Arg.java
index 9dd5c93..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),
 
@@ -157,45 +157,59 @@ public enum Arg
   IMAGE(Type.IMAGE,
           "Output an image of the open alignment window. Format is specified by the subval modifier, a following --type argument or guessed from the file extension. Valid formats/extensions are:\n"
                   + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS, Opt.ALLOWMULTIID,
-          Opt.REQUIREINPUT, Opt.OUTPUTFILE, Opt.PRIMARY),
+          Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS, Opt.MULTIVALUE,
+          Opt.ALLOWMULTIID, Opt.REQUIREINPUT, Opt.OUTPUTFILE, Opt.PRIMARY),
+  STRUCTUREIMAGE(Type.IMAGE,
+          "Export an image of a 3D structure opened in JMOL", Opt.STRING,
+          Opt.LINKED, Opt.MULTIVALUE, Opt.OUTPUTFILE, Opt.ALLOWMULTIID,
+          Opt.PRIMARY),
   TYPE(Type.IMAGE,
-          "Set the image format for the preceding --image. Valid values are:\n"
-                  + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+          "Set the image format for the preceding " + Arg.IMAGE.argString()
+                  + " or " + Arg.STRUCTUREIMAGE.argString()
+                  + ". Valid values are:\n" + "svg,\n" + "png,\n" + "eps,\n"
+                  + "html,\n" + "biojs.",
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
   TEXTRENDERER(Type.IMAGE,
           "Sets whether text in a vector image format (SVG, HTML, EPS) should be rendered as text or vector line-art. Possible values are:\n"
                   + "text,\n" + "lineart.",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
   SCALE(Type.IMAGE,
           "Sets a scaling for bitmap image format (PNG). Should be given as a floating point number. If used in conjunction with --width and --height then the smallest scaling will be used (scale, width and height provide bounds for the image).",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
   WIDTH(Type.IMAGE,
           "Sets a width for bitmap image format (PNG) with the height maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --scale and --height then the smallest scaling will be used (scale, width and height provide bounds for the image).",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
   HEIGHT(Type.IMAGE,
           "Sets a height for bitmap image format (PNG) with the width maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --scale and --width then the smallest scaling will be used (scale, width and height provide bounds for the image).",
-          Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
-  STRUCTUREIMAGE(Type.STRUCTUREIMAGE,
-          "Export an image of a 3D structure opened in JMOL", Opt.STRING,
-          Opt.LINKED, Opt.MULTIVALUE, Opt.OUTPUTFILE, Opt.ALLOWMULTIID),
-  STRUCTUREIMAGETYPE(Type.STRUCTUREIMAGE,
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
+  IMAGECOLOUR(Type.IMAGE, "imagecolor", // being a bit soft on the Americans!
+          "Applies the colour scheme to the open alignment window for this image, otherwise the value of "
+                  + Arg.COLOUR.argString()
+                  + " (or none) will apply. Valid values are the same as "
+                  + Arg.COLOUR.argString() + ".",
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
+  BGCOLOUR(Type.IMAGE, "bgcolor", // being a bit soft on the Americans!
+          "Applies a background colour to the structure image. Valid values are named colours or #RRGGBB.",
+          Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWMULTIID),
+  /*
+  STRUCTUREIMAGETYPE(Type.IMAGE,
           "Set the structure image format for the preceding --structureimage. Valid values are:\n"
                   + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
           Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
-  STRUCTUREIMAGETEXTRENDERER(Type.STRUCTUREIMAGE,
+  STRUCTUREIMAGETEXTRENDERER(Type.IMAGE,
           "Sets whether text in a vector structure image format (SVG, EPS) should be rendered as text or vector line-art. Possible values are:\n"
                   + "text,\n" + "lineart.",
           Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
-  STRUCTUREIMAGESCALE(Type.STRUCTUREIMAGE,
+  STRUCTUREIMAGESCALE(Type.IMAGE,
           "Sets a scaling for bitmap structure image format (PNG). Should be given as a floating point number. If used in conjunction with --structureimagewidth and --structureimageheight then the smallest scaling will be used (structureimagescale, structureimagewidth and structureimageheight provide bounds for the structure image).",
           Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
-  STRUCTUREIMAGEWIDTH(Type.STRUCTUREIMAGE,
+  STRUCTUREIMAGEWIDTH(Type.IMAGE,
           "Sets a width for bitmap structure image format (PNG) with the height maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --structureimagescale and --structureimageheight then the smallest scaling will be used (structureimagescale, structureimagewidth and structureimageheight provide bounds for the structure image).",
           Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
-  STRUCTUREIMAGEHEIGHT(Type.STRUCTUREIMAGE,
+  STRUCTUREIMAGEHEIGHT(Type.IMAGE,
           "Sets a height for bitmap structure image format (PNG) with the width maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --structureimagescale and --structureimagewidth then the smallest scaling will be used (structureimagescale, structureimagewidth and structureimageheight provide bounds for the structure image).",
           Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+  */
 
   OUTPUT(Type.OUTPUT,
           "Export the open alignment to file filename. The format name is specified by the subval modifier format=name, a following --format name argument or guessed from the file extension. Valid format names (and file extensions) are:\n"
@@ -463,8 +477,9 @@ public enum Arg
     STRUCTURE("arguments used to add and format 3D structure data"),
     PROCESS("arguments used to process an alignment once opened"),
     OUTPUT("arguments used to save data from a processed alignment"),
-    IMAGE("arguments used to export an image of an alignment"),
-    STRUCTUREIMAGE("arguments used to export an image of an structure"),
+    IMAGE("arguments used to export an image of an alignment or structure"),
+    // IMAGE("arguments used to export an image of an alignment"),
+    // STRUCTUREIMAGE("arguments used to export an image of an structure"),
     FLOW("arguments that control processing of the other arguments"), //
     ALL("all arguments"), // mostly just a place-holder for --help-all
     NONE, // mostly a place-holder for --help