From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30318 invoked by alias); 18 Mar 2008 20:11:45 -0000 Received: (qmail 30308 invoked by uid 22791); 18 Mar 2008 20:11:45 -0000 X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33,J_CHICKENPOX_64,J_CHICKENPOX_66,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Mar 2008 20:11:24 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m2IKBMJR021972 for ; Tue, 18 Mar 2008 16:11:22 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2IKBLLa002980; Tue, 18 Mar 2008 16:11:21 -0400 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2IKBLpI009280; Tue, 18 Mar 2008 16:11:21 -0400 Message-ID: <47E021DF.40407@redhat.com> Date: Tue, 18 Mar 2008 20:11:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Phil Muldoon CC: Frysk Hackers Subject: Re: Patch: Add Option Groups References: <47DFFE9D.80906@redhat.com> In-Reply-To: <47DFFE9D.80906@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00164.txt.bz2 Phil, public CommandlineParser(String name, String version) { I'd either: create the utility specific group, and then the standard frysk option group and all the standard frysk options here; and then have "add" add to the utility specific group - since group order comes first things will be as expected or add an abstract method to get the options to CommandLineParser and have the extensions implement that - it can then be called before the standard frysk options group is created as you suggest, doing this as a side effect of parse is asking for trouble. Andrew parser = new Parser(name, version, true); - parser.add(new LogOption("debug")); - add(new Option("noexe", "Do not attempt to read an"+ - " executable for a corefile ") { - public void parsed(String exeValue) throws OptionException { - extendedCore = false; - explicitExe = null; - } - }); - add(new Option("exe", - "Specify the full path of the executable to read", - "") { - public void parsed(String exeValue) throws OptionException { - extendedCore = true; - explicitExe = exeValue; - } - });