This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Add Option Groups


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;
-        }
-        });


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]