|
From: Michael A. <mic...@ze...> - 2003-10-27 18:04:40
|
PS: Sorry, I should have said which revision number ;-) On Mon, 2003-10-27 at 10:44, Dejan Krsmanovic wrote: > Hi Mike! > It took me half an hour to find exact version where it was removed! But I > found it. > So, the short answer is that we have implemented "Holywood principle" (Don't > call me, I'll call you) or Template method pattern (I think it is called > that way!). > > The long answer is: > In old Babeldoc code there was concrete method execute() in BabeldocCommand > whoch have done few common tasks. All subclasses were expected to call > super.execute() at the begining of their own implementation. > This wasn't good solution since there was no guarantee that subclasses will > actually call execute method. So we have introduced new method called > executeCommand and copied method body from BabeldocCommand.execute() method > which became abstract. Also, at the end of executeCommand there is now call > to execute method. In BabeldocCommand constructor now is called > executeCommand instead of execute. > This was we have achieved following: > 1. Code from BabeldocCommand.executeCommand() will be always executed (we > are not rellying on subclass to call super method) > 2. Subclasses are now required to implement execute() method since it is > abstract > > I hope I have answered your question! Feel free to ask more if something > left unclear! > > Regards, > Dejan > > ----- Original Message ----- > From: "Michael Ansley" <mic...@ze...> > To: <Bru...@ba...> > Cc: <bab...@li...> > Sent: Saturday, October 25, 2003 12:44 AM > Subject: [Babeldoc-devel] Scanner change > > > > Hi, Bruce, > > > > In August, you checked in a change which removed a line from > > Scanner.java, in method execute, which called the super method. Could > > you please let me know why this was removed, if you still remember why? > > > > Thanks... > > > > > > MikeA > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: The SF.net Donation Program. > > Do you like what SourceForge.net is doing for the Open > > Source Community? Make a contribution, and help us add new > > features and functionality. Click here: http://sourceforge.net/donate/ > > _______________________________________________ > > Babeldoc-devel mailing list > > Bab...@li... > > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel > > |