Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 73986 invoked from network); 6 Feb 2003 10:53:36 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 6 Feb 2003 10:53:36 -0000 Received: (qmail 22108 invoked by uid 97); 6 Feb 2003 10:55:17 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 22101 invoked from network); 6 Feb 2003 10:55:16 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 6 Feb 2003 10:55:16 -0000 Received: (qmail 73746 invoked by uid 500); 6 Feb 2003 10:53:34 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 73735 invoked from network); 6 Feb 2003 10:53:34 -0000 Received: from mail.intalio.com (63.147.172.101) by daedalus.apache.org with SMTP; 6 Feb 2003 10:53:34 -0000 Received: from binky (CPE-203-45-10-26.vic.bigpond.net.au [203.45.10.26]) by mail.intalio.com (8.11.1/8.11.1) with SMTP id h16Argd29820 for ; Thu, 6 Feb 2003 02:53:42 -0800 Reply-To: From: "Tim Anderson" To: "Jakarta Commons Developers List" Subject: RE: [CLI] new design possibly? Date: Thu, 6 Feb 2003 21:55:09 +1100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Not a critique on your design, but an RFE ;) One useful addition to CLI would be to be able to specify mutually exclusive sets of arguments, which contain common options. Eg: usage: org.apache.commons.sql.util.DDL commands: -execute -db [-version ] -schema [-drop] -print -db [-version ] [-drop] -list -types db-props: -driver -url [-user ] [-password ] In the above, -execute, -print, -list and -types are mutually exclusive, and represents a set of arguments which are applicable to both -execute and -types. It would be nice to be able to do something like: OptionSet dbprops = new OptionSet("db-props"); dbprops.addOption("driver", true, ....); dbprops.addOption("url", true, ....); ... OptionSet execute = new OptionSet("execute", "executes DDL for a schema"); execute.addOption("db", true, ....); execute.addOptionSet(dbprops); ... OptionSet types = new OptionSet("types", "generate type info"); types.addOptionSet(dbprops); OptionGroup group = new OptionGroup(); group.addOptionSet(execute); ... group.addOptionSet(types); The advantages of this are that: . CLI can do more of the validation . HelpFormatter can be enhanced to format wierder command line syntaxes (such as the above), rather than doing it manually in code. Thoughts? Thanks, Tim > -----Original Message----- > From: John Keyes [mailto:jbjk@mac.com] > Sent: Thursday, February 06, 2003 10:59 AM > To: commons-dev > Subject: [CLI] new design possibly? > > > I have grown disgruntled with CLIs current design so I have done > some thinking on the matter (BTW, I know I should have done > this before a 1.0 release). Before I finish working on it > I thought I'd seek comments from you guys. Check out the > class diagram at http://www.integralsource.com/cli/datatype.gif > and let me hear your comments. > > Thanks, > -John K > - - - - - - - - - - - - - - - - - - - - - - - > Jakarta Commons CLI > http://jakarta.apache.org/commons/cli > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org