public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: Frysk Hackers <frysk@sourceware.org>
Subject: Re: Patch: Add Option Groups
Date: Tue, 18 Mar 2008 20:11:00 -0000	[thread overview]
Message-ID: <47E021DF.40407@redhat.com> (raw)
In-Reply-To: <47DFFE9D.80906@redhat.com>

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",
-               "<executable>") {
-        public void parsed(String exeValue) throws OptionException {
-            extendedCore = true;
-            explicitExe = exeValue;
-        }
-        });

  parent reply	other threads:[~2008-03-18 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18 17:41 Phil Muldoon
2008-03-18 18:28 ` Tom Tromey
2008-03-19  7:51   ` Phil Muldoon
2008-03-19 13:23     ` Tom Tromey
2008-03-18 20:11 ` Andrew Cagney [this message]
2008-03-19  7:46   ` Phil Muldoon
2008-03-20 11:52     ` Andrew Cagney
2008-03-20 14:23       ` Tom Tromey
2008-03-20 16:09         ` Andrew Cagney
2008-03-20 18:06           ` Tom Tromey
2008-04-01 21:36             ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47E021DF.40407@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=pmuldoon@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).