From: Ben Soares Date: Wed, 8 Mar 2023 15:56:02 +0000 (+0000) Subject: JAL-629 --close individually for each AlignFrame opened now allows batch processing... X-Git-Tag: Release_2_11_4_0~454 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=71fc2ec36ecf51f66225d9b98eb475ae657bef05;p=jalview.git JAL-629 --close individually for each AlignFrame opened now allows batch processing of jobs in one jalview instance --- diff --git a/src/jalview/bin/ArgParser.java b/src/jalview/bin/ArgParser.java index ae87001..65d0026 100644 --- a/src/jalview/bin/ArgParser.java +++ b/src/jalview/bin/ArgParser.java @@ -68,7 +68,8 @@ public class ArgParser USAGESTATS, OPEN, OPEN2, PROPS, QUESTIONNAIRE, SETPROP, TREE, VDOC, VSESS, OUTPUT, OUTPUTTYPE, SSANNOTATION, NOTEMPFAC, TEMPFAC, TEMPFAC_LABEL, TEMPFAC_DESC, TEMPFAC_SHADING, TITLE, PAEMATRIX, WRAP, - NOSTRUCTURE, STRUCTURE, IMAGE, QUIT, DEBUG("d"), QUIET("q"), ARGFILE; + NOSTRUCTURE, STRUCTURE, IMAGE, QUIT, CLOSE, DEBUG("d"), QUIET("q"), + ARGFILE; static { @@ -120,6 +121,7 @@ public class ArgParser WRAP.setOptions(Opt.BOOLEAN, Opt.LINKED); IMAGE.setOptions(Opt.STRING, Opt.LINKED); QUIT.setOptions(Opt.UNARY); + CLOSE.setOptions(Opt.UNARY, Opt.LINKED); DEBUG.setOptions(Opt.BOOLEAN, Opt.BOOTSTRAP); QUIET.setOptions(Opt.UNARY, Opt.MULTI, Opt.BOOTSTRAP); ARGFILE.setOptions(Opt.STRING, Opt.MULTI, Opt.BOOTSTRAP); diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index b42f08e..001e32e 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -77,6 +77,7 @@ public class Commands { for (String id : argParser.linkedIds()) { + ArgValuesMap avm = argParser.linkedArgs(id); Commands cmds = new Commands(); if (id == null) { @@ -90,6 +91,17 @@ public class Commands } cmds.processImages(id); argsWereParsed &= cmds.wereParsed(); + + // close ap + if (avm.getBoolean(Arg.CLOSE)) + { + AlignFrame af = cmds.afMap.get(id); + if (af != null) + { + af.closeMenuItem_actionPerformed(true); + } + } + } }