From 8e31c2818d590aa5b39f1c2cf11a06fe08f5b1ec Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:38:27 +0000 Subject: Keep order of CLI arguments git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@430 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java | 8 ++++---- .../pdfover/gui/workflow/states/PrepareConfigurationState.java | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'pdf-over-gui/src/main/java/at') 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 cliArguments = new HashMap(); + private Map cliArguments = new LinkedHashMap(); private StateMachine stateMachine = null; @@ -58,7 +58,7 @@ public class ArgumentHandler { * @return the list of available arguments */ public Set getArguments() { - return new HashSet(this.cliArguments.values()); + return new LinkedHashSet(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); -- cgit v1.2.3