/hg/icedtea-web: Standardize all options to use hyphens

ldracz at icedtea.classpath.org ldracz at icedtea.classpath.org
Wed Oct 8 14:30:30 UTC 2014


changeset 82e8a9e81520 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=82e8a9e81520
author: Lukasz Dracz <ldracz at redhat.com>
date: Wed Oct 08 10:30:20 2014 -0400

	Standardize all options to use hyphens

	2014-10-08  Lukasz Dracz  <ldracz at redhat.com>

	        Standardize all options to use hyphens
	        * netx/net/sourceforge/jnlp/OptionsDefinitions.java:
	        itweb-settings options changed to have hyphens in front,
	        added new enum to NumberOfArguments
	        (getItwsettingsCommands): added headless, changed nodashhelp to help
	        * netx/net/sourceforge/jnlp/controlpanel/CommandLine.java
	        * netx/net/sourceforge/jnlp/resources/Messages.properties:
	        (BOHelp, IBOCheck): modified (NOAevennumberorequalschar): added


diffstat:

 ChangeLog                                               |  11 ++++++
 netx/net/sourceforge/jnlp/OptionsDefinitions.java       |  27 ++++++++++------
 netx/net/sourceforge/jnlp/controlpanel/CommandLine.java |   2 +-
 netx/net/sourceforge/jnlp/resources/Messages.properties |   6 +-
 4 files changed, 31 insertions(+), 15 deletions(-)

diffs (132 lines):

diff -r 8967abe15ea3 -r 82e8a9e81520 ChangeLog
--- a/ChangeLog	Wed Oct 08 15:19:37 2014 +0200
+++ b/ChangeLog	Wed Oct 08 10:30:20 2014 -0400
@@ -1,3 +1,14 @@
+2014-10-08  Lukasz Dracz  <ldracz at redhat.com>
+
+        Standardize all options to use hyphens
+        * netx/net/sourceforge/jnlp/OptionsDefinitions.java:
+        itweb-settings options changed to have hyphens in front,
+        added new enum to NumberOfArguments
+        (getItwsettingsCommands): added headless, changed nodashhelp to help
+        * netx/net/sourceforge/jnlp/controlpanel/CommandLine.java
+        * netx/net/sourceforge/jnlp/resources/Messages.properties:
+        (BOHelp, IBOCheck): modified (NOAevennumberorequalschar): added
+
 2014-10-08  Jiri Vanek  <jvanek at redhat.com>
 
 	itw-plugin and itweb-settings documentation made localizable
diff -r 8967abe15ea3 -r 82e8a9e81520 netx/net/sourceforge/jnlp/OptionsDefinitions.java
--- a/netx/net/sourceforge/jnlp/OptionsDefinitions.java	Wed Oct 08 15:19:37 2014 +0200
+++ b/netx/net/sourceforge/jnlp/OptionsDefinitions.java	Wed Oct 08 10:30:20 2014 -0400
@@ -73,14 +73,13 @@
         TRUSTNONE("-Xtrustnone","BOTrustnone"),
         JNLP("-jnlp","BOJnlp", NumberOfArguments.ONE),
         //itweb settings
-        NODASHHELP("help", "IBOHelp"),
-        LIST("list", "IBOList"),
-        GET("get", "name", "IBOGet"),
-        INFO("info", "name", "IBOInfo"),
-        SET("set", "name value", "IBOSet"),
-        RESETALL("reset", "all", "IBOResetAll"),
-        RESET("reset", "name", "IBOReset"),
-        CHECK("check", "name", "IBOCheck"),
+        LIST("-list", "IBOList"),
+        GET("-get", "name", "IBOGet", NumberOfArguments.ONE_OR_MORE),
+        INFO("-info", "name", "IBOInfo", NumberOfArguments.ONE_OR_MORE),
+        SET("-set", "name value", "IBOSet", NumberOfArguments.EVEN_NUMBER_OR_WITHEQUALCHAR),
+        RESETALL("-reset", "all", "IBOResetAll"),
+        RESET("-reset", "name", "IBOReset", NumberOfArguments.ONE_OR_MORE),
+        CHECK("-check", "name", "IBOCheck"),
         //policyeditor
         //-help
         FILE("-file", "policy_file", "PBOFile"),
@@ -123,6 +122,10 @@
             return numberOfArguments == NumberOfArguments.EQUALS_CHAR;
         }
 
+        public boolean hasEvenNumberOrWithEqualsChar() {
+            return numberOfArguments == NumberOfArguments.EVEN_NUMBER_OR_WITHEQUALCHAR;
+        }
+
         public boolean hasOneOrMoreArguments() {
             return numberOfArguments == NumberOfArguments.ONE_OR_MORE;
         }
@@ -140,6 +143,7 @@
         NONE("NOAnone"),
         ONE("NOAone"),
         ONE_OR_MORE("NOAonemore"),
+        EVEN_NUMBER_OR_WITHEQUALCHAR("NOAevennumberorequalschar"),
         EQUALS_CHAR("NOAequalschar");
 
         String messageKey;
@@ -155,13 +159,14 @@
 
     public static List<OPTIONS> getItwsettingsCommands() {
         return Arrays.asList(new OPTIONS[]{
-            OPTIONS.NODASHHELP,
+            OPTIONS.HELP,
             OPTIONS.LIST,
             OPTIONS.GET,
             OPTIONS.INFO,
             OPTIONS.SET,
+            OPTIONS.RESET,
             OPTIONS.RESETALL,
-            OPTIONS.RESET,
+            OPTIONS.HEADLESS,
             OPTIONS.CHECK
         });
     }
@@ -210,7 +215,7 @@
         l.addAll(getJavaWsRuntimeOptions());
         l.addAll(getJavaWsControlOptions());
         //trustall is not returned by getJavaWsRuntimeOptions
-        //or getJavaWsControlOptions, as it is not desitred in documentation
+        //or getJavaWsControlOptions, as it is not desired in documentation
         l.add(OPTIONS.TRUSTALL);
         return l;
     }
diff -r 8967abe15ea3 -r 82e8a9e81520 netx/net/sourceforge/jnlp/controlpanel/CommandLine.java
--- a/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java	Wed Oct 08 15:19:37 2014 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java	Wed Oct 08 10:30:20 2014 -0400
@@ -438,7 +438,7 @@
         List<String> arguments = new ArrayList<>(Arrays.asList(argsArray));
 
         int val;
-        if (command.equals(OptionsDefinitions.OPTIONS.NODASHHELP.option)) {
+        if (command.equals(OptionsDefinitions.OPTIONS.HELP.option)) {
             val = handleHelpCommand();
         } else if (command.equals(OptionsDefinitions.OPTIONS.LIST.option)) {
             val = handleListCommand(arguments);
diff -r 8967abe15ea3 -r 82e8a9e81520 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Oct 08 15:19:37 2014 +0200
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Oct 08 10:30:20 2014 -0400
@@ -320,18 +320,17 @@
 BXclearcache= Clean the JNLP application cache.
 BXignoreheaders= Skip jar header verification.
 BXoffline   = Prevent ITW network connection. Only cache will be used. Application can still connect.
-BOHelp      = Print this message and exit.
+BOHelp      = Prints out information about supported command and basic usage.
 BOTrustnone = Instead of asking user, will foretold all answers as no.
 
 # Itweb-settings boot commands
-IBOHelp=Prints out information about supported command, descriptions and basic usage.
 IBOList=Shows a list of all settings.
 IBOGet=Shows the value of the named setting.
 IBOInfo=Shows additional information about the named setting. Includes a description, the current value, the possible values, and the source of the setting.
 IBOSet=Sets the setting to the new value, after checking that it is an appropriate value.
 IBOResetAll= Resets all settings to their original values.
 IBOReset=Resets the named setting to its original value.
-IBOCheck=Checks that the current value of the setting is a valid value.
+IBOCheck=Checks that the current settings have valid values.
 
 PBOFile=Specifies a policy file path to open. If exactly one argument is given, and it is not this flag, it is interpreted as a file path to open, as if this flag was given first. This flag exists \
 mostly for compatibility with Policy Tool, but is also needed when opening a policy file and also using the -codebase flag.
@@ -344,6 +343,7 @@
 NOAone=Exactly one argument expected
 NOAonemore=Expected one or more arguments
 NOAequalschar=Expected -param=value vaue declaration
+NOAevennumberorequalschar=Expected one or more arguments with param=value as valid argument
 
 # Allowed man sections
 manNAME=NAME


More information about the distro-pkg-dev mailing list