From 4bf3814d7eefb7ce4e17af501c3711e1b21b5e67 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 26 Sep 2007 15:56:11 +0000
Subject: [PATCH] Addresses issue 2143 which is intended to help with the readability of the usage statements by allowing options to be grouped logically by type. Many of the utilities arguments have grown to such an extent that it is difficult to sort through the various types of arguments to find what you are looking for. For instance the usage statement for the task schedulable arguments are mixed with the LDAP connection arguments which makes them difficult to ignore if they want to use the tool in offline mode.
---
opends/src/server/org/opends/server/admin/client/cli/SecureConnectionCliParser.java | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/admin/client/cli/SecureConnectionCliParser.java b/opends/src/server/org/opends/server/admin/client/cli/SecureConnectionCliParser.java
index 5cfc84c..0c13825 100644
--- a/opends/src/server/org/opends/server/admin/client/cli/SecureConnectionCliParser.java
+++ b/opends/src/server/org/opends/server/admin/client/cli/SecureConnectionCliParser.java
@@ -57,6 +57,7 @@
import org.opends.server.util.args.FileBasedArgument;
import org.opends.server.util.args.StringArgument;
import org.opends.server.util.args.SubCommandArgumentParser;
+import org.opends.server.util.args.ArgumentGroup;
/**
* This is a commodity class that can be used to check the arguments required
@@ -344,9 +345,26 @@
protected void initializeGlobalArguments(Collection<Argument> args)
throws ArgumentException
{
+ initializeGlobalArguments(args, null);
+ }
+
+
+ /**
+ * Initialize the global options with the provided set of arguments.
+ * @param args the arguments to use to initialize the global options.
+ * @param argGroup to which args will be added
+ * @throws ArgumentException if there is a conflict with the provided
+ * arguments.
+ */
+ protected void initializeGlobalArguments(
+ Collection<Argument> args,
+ ArgumentGroup argGroup)
+ throws ArgumentException
+ {
+
for (Argument arg : args)
{
- addGlobalArgument(arg);
+ addGlobalArgument(arg, argGroup);
}
// Set the propertiesFile argument
--
Gitblit v1.10.0