Moving to the list for wider comment. (will reply separately)
-------- Original Message -------- Subject: Re: [CLI] PatternOptionBuilder Date: Fri, 26 Mar 2004 17:39:21 -0500 (EST) From: Michael Heuer <[EMAIL PROTECTED]> To: Rob Oxspring <[EMAIL PROTECTED]>
On Fri, 26 Mar 2004, Rob Oxspring wrote:
I'm pretty sure this is doable in cli2, is there any particular part of it that's causing you problems?
I guess I'm looking for something like the attached file
Application.java
(although to be honest I don't really like the class name)
Maybe ApplicationHelper? Dunno. I think I get where you're coming from though; while the api is pretty application agnostic, it would also be good to help out those that simply want to hit the ground running. It would be much more prescribing of how people write their application than the API but it would be totally optional.
I'm a bit confused on the createOptions() method -- do I have this right by returning a Group containing all the Options? Perhaps you could show me or point me to an example of what this method's implementation might look like.
Yeah - I'd have it returning a Group instance. Implementations would grab a GroupBuilder and pretty much look like the majority of the test cases in o.a.c.cli2.apps.
If I wanted the Application class to add "standard" options like --help and --verbose should I just add those to the Group that is returned?
Absolutely.
In my 1.0 version the abstract class held an instance of Options and the abstract method was
protected abstract addOption(Option);
This could still be done instead of the createOptions() method. It would simply mean that the Application class is responsible for creating the Group rather than the option.
Thank you for your help.
michael
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
