diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:38:27 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:38:27 +0000 |
commit | 8e31c2818d590aa5b39f1c2cf11a06fe08f5b1ec (patch) | |
tree | 1244ab5017eccf202e90f2b57c56bed8484d8f01 /pdf-over-gui | |
parent | f7f58602d3385c01bf5d4cc15dadd7e7cb0e8524 (diff) | |
download | mocca-8e31c2818d590aa5b39f1c2cf11a06fe08f5b1ec.tar.gz mocca-8e31c2818d590aa5b39f1c2cf11a06fe08f5b1ec.tar.bz2 mocca-8e31c2818d590aa5b39f1c2cf11a06fe08f5b1ec.zip |
Keep order of CLI arguments
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@430 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java | 8 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java index 9fb6f7ab..dbc92a29 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java @@ -16,8 +16,8 @@ package at.asit.pdfover.gui.cliarguments; // Imports -import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; @@ -37,7 +37,7 @@ public class ArgumentHandler { private static final Logger log = LoggerFactory .getLogger(ArgumentHandler.class); - private Map<String, Argument> cliArguments = new HashMap<String, Argument>(); + private Map<String, Argument> cliArguments = new LinkedHashMap<String, Argument>(); private StateMachine stateMachine = null; @@ -58,7 +58,7 @@ public class ArgumentHandler { * @return the list of available arguments */ public Set<Argument> getArguments() { - return new HashSet<Argument>(this.cliArguments.values()); + return new LinkedHashSet<Argument>(this.cliArguments.values()); } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java index d0f1f014..ae81ce7b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java @@ -72,15 +72,16 @@ public class PrepareConfigurationState extends State { super(stateMachine); this.handler = new ArgumentHandler(this.stateMachine); this.handler.addCLIArgument(HelpArgument.class); - this.handler.addCLIArgument(AutomaticPositioningArgument.class); + this.handler.addCLIArgument(InputDocumentArgument.class); + this.handler.addCLIArgument(OutputFolderArgument.class); this.handler.addCLIArgument(BKUArgument.class); this.handler.addCLIArgument(PhoneNumberArgument.class); - this.handler.addCLIArgument(EmblemArgument.class); this.handler.addCLIArgument(PasswordArgument.class); this.handler.addCLIArgument(ProxyHostArgument.class); this.handler.addCLIArgument(ProxyPortArgument.class); - this.handler.addCLIArgument(OutputFolderArgument.class); - this.handler.addCLIArgument(InputDocumentArgument.class); + this.handler.addCLIArgument(EmblemArgument.class); + this.handler.addCLIArgument(AutomaticPositioningArgument.class); + this.handler.addCLIArgument(SkipFinishArgument.class); // adding config file argument to this handler so it appears in help this.handler.addCLIArgument(ConfigFileArgument.class); |