From 0c950f58fb55560af9fb5435b89040e0e28e09a6 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.

---
 opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java b/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java
index cf93e98..891441c 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java
@@ -30,6 +30,7 @@
 import org.opends.server.util.args.LDAPConnectionArgumentParser;
 import org.opends.server.util.args.ArgumentException;
 import org.opends.server.util.args.StringArgument;
+import org.opends.server.util.args.ArgumentGroup;
 import static org.opends.server.util.StaticUtils.wrapText;
 import static org.opends.server.util.StaticUtils.getExceptionMessage;
 import static org.opends.server.util.ServerConstants.MAX_LINE_WIDTH;
@@ -101,8 +102,14 @@
   protected LDAPConnectionArgumentParser createArgParser(String className,
                                            Message toolDescription)
   {
+    ArgumentGroup ldapGroup = new ArgumentGroup(
+            INFO_DESCRIPTION_TASK_LDAP_ARGS.get(), 1001);
+
     argParser = new LDAPConnectionArgumentParser(className,
-            toolDescription, false);
+            toolDescription, false, ldapGroup);
+
+    ArgumentGroup taskGroup = new ArgumentGroup(
+            INFO_DESCRIPTION_TASK_TASK_ARGS.get(), 1000);
 
     try {
       startArg = new StringArgument(
@@ -112,7 +119,7 @@
               true, OPTION_VALUE_START_DATETIME,
               null, null,
               INFO_DESCRIPTION_START_DATETIME.get());
-      argParser.addArgument(startArg);
+      argParser.addArgument(startArg, taskGroup);
     } catch (ArgumentException e) {
       // should never happen
     }

--
Gitblit v1.10.0