This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
Re: Patch: Add Option Groups
- From: Andrew Cagney <cagney at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: Frysk Hackers <frysk at sourceware dot org>
- Date: Tue, 18 Mar 2008 16:11:11 -0400
- Subject: Re: Patch: Add Option Groups
- References: <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;
- }
- });