|
From: Dejan K. <dej...@nb...> - 2003-08-06 09:29:25
|
After looking at code you have commited I doubt if this is really good solution... Since h option belongs to parrent class, BabeldocCommand, I guess that class is right place for handling this situation, otherwise, all other commands might need dealing with it. So, what do you think about having System.exit call inside printUsage method? Also, some refactoring is probably needed inside BabeldocCommand class. There are few things that I don't like right now: 1. This should be abstract class, right? Making BabeldocCommand instance does not make a sence. 2. We should not expect that subclasses will call super implementation when overide some method. For example in current implementation, subclass should call super.execute() when overriding execute() method. Better solution would be "Don't call me - I'll call you!" (Hollywood) principle. That is, BabeldocCommand should have one method, for example executeBabeldocCommand() that should call abstract execute() method. That way, subclass will be forced to implement execute(), and it should not worry about super implementation if it does not need to change default behaviour. 3. We should make all methods that subclasses need to implement abstract. That way we can make sure that it will be implemented. What do you think about this? I think it is quite easy to change this, but since many classes extend this class we need to agree with it! Dejan ----- Original Message ----- From: "David Glick" <dg...@co...> To: <bab...@li...> Sent: Wednesday, August 06, 2003 2:46 AM Subject: [Babeldoc-devel] Scanner tool and '-h' option? > It's normal for a program that prints a help screen to end so that it can be > re-run with options. The process tool, for example, does this, but the > scanner tool will print the help options and then continue to execute. Is > this the intended functionality? If not, I'd be happy to change it, because > it's driving me slightly batty... :-) > > > David > > -- > David Glick > Transmit Consulting, Inc > 619-475-4052 > dg...@tr... > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Babeldoc-devel mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |