X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2Fargparser%2FArg.java;h=c502eecb665819b3ce860e7b97ea8f6782a05cd7;hb=4fd4608b88401dbb1a86a29f8d607c7481145e27;hp=8bac62358e397e7543bec7c5e84c501845f8c0ed;hpb=3e8516c59908e9f9f791cf820321c5007bdd58ec;p=jalview.git diff --git a/src/jalview/bin/argparser/Arg.java b/src/jalview/bin/argparser/Arg.java index 8bac623..c502eec 100644 --- a/src/jalview/bin/argparser/Arg.java +++ b/src/jalview/bin/argparser/Arg.java @@ -28,7 +28,11 @@ public enum Arg + ChannelProperties.getProperty("app_name"), Opt.UNARY, Opt.BOOTSTRAP), HEADLESS(Type.CONFIG, - "Run Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed.", + "Run Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed. " + + "Headless mode is assumed if an output file is to be generated, this can be overridden with --noheadless or --gui.", + Opt.BOOLEAN, Opt.BOOTSTRAP), + GUI(Type.CONFIG, + "Do not run Jalview in headless mode. This overrides the assumption of headless mode when an output file is to be generated.", Opt.UNARY, Opt.BOOTSTRAP), JABAWS(Type.CONFIG, "Set a different URL to connect to a JABAWS server.", Opt.STRING, Opt.BOOTSTRAP), @@ -140,7 +144,7 @@ public enum Arg "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.ALLOWALL, - Opt.REQUIREINPUT, Opt.OUTPUT, Opt.PRIMARY), + Opt.REQUIREINPUT, Opt.OUTPUTFILE, 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.", @@ -160,7 +164,7 @@ public enum Arg Opt.STRING, Opt.LINKED, Opt.ALLOWALL), STRUCTUREIMAGE(Type.STRUCTUREIMAGE, "Export an image of a 3D structure opened in JMOL", Opt.STRING, - Opt.LINKED, Opt.MULTI), + Opt.LINKED, Opt.MULTI, Opt.OUTPUTFILE), STRUCTUREIMAGETYPE(Type.STRUCTUREIMAGE, "Set the structure image format for the preceding --structureimage. Valid values are:\n" + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.", @@ -188,7 +192,7 @@ public enum Arg + "clustal (aln),\n" + "phylip (phy),\n" + "jalview (jvp, jar).", Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS, Opt.ALLOWALL, - Opt.REQUIREINPUT, Opt.OUTPUT, Opt.PRIMARY), + Opt.REQUIREINPUT, Opt.OUTPUTFILE, Opt.PRIMARY), FORMAT(Type.OUTPUT, "Sets the format for the preceding --output file. Valid formats are:\n" + "fasta,\n" + "pfam,\n" + "stockholm,\n" + "pir,\n" @@ -325,8 +329,9 @@ public enum Arg INPUT, // This Arg counts as an input for REQUIREINPUT REQUIREINPUT, // This Arg can only be applied via --all if there is an // input (i.e. --open or --append) - OUTPUT, // This Arg provides an output filename. With Opt.ALLOWALL *.ext is - // shorthand for --all --output={basename}.ext + OUTPUTFILE, // This Arg provides an output filename. With Opt.ALLOWALL *.ext + // is + // shorthand for --all --output={basename}.ext STORED, // This Arg resets and creates a new set of "opened" linkedIds HELP, // This Arg is a --help type arg PRIMARY, // This Arg is the main Arg for its type @@ -489,6 +494,11 @@ public enum Arg return true; } + protected Opt[] getOptions() + { + return argOptions; + } + protected void setOptions(Opt... options) { this.argOptions = options;