Maybe to avoid a new Tag and do not have to remember to add it, should I add a parameter to have something like :
<XDtMethod:ifHasMethod name="..." setCurrentMethod="true/false"> With a default to "true" meaning we set the current method by default. Vincent > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf > Of Andrew Stevens > Sent: mardi 1 janvier 2002 12:33 > To: [EMAIL PROTECTED] > Subject: Re: [Xdoclet-devel] XDtMethod:ifHasMethod does not > setCurrentMethod > > > A wise old hermit known only as Vincent Harcq > <[EMAIL PROTECTED]> once said: > > > ifHasMethod does not call setCurrentMethod. > > I propose to change that and the corresponding J files. > > Wasn't that the point of the hasMethod tag we discussed > recently (thread > with subject "entitycmp.j") which Ara removed because "the > code was the > same"? I assumed that ifHasMethod was therefore already > doing this, since > that was the point of the removed code... > > > The issue I have is that XDtMethod:ifIsNotAbstract does not work in > > case a setter method is not abstract while a getter is. > > > > Another solution could be to parametrized > XDtMethod:ifIsNotAbstract, > > but I think setting the current method will makes things clearer. > > I also prefer setting the current method over adding another > parameter to > ifIsNotAbstract. Having it in ifHasMethod does lose some > flexibility, > though. It's fine for the BMP getters & setters, where we > then just have > forAllPersistentFields > ifHasMethod(getter) > ifIsNotAbstract > <getter stuff> > ifHasMethod(setter) > ifIsNotAbstract > <setter stuff> > but if you're doing some weird custom template where code in > one generated > method varies depending just on the existence of some other > method(s), but > you still want to use the method level tag information from > the original > method, then having ifHasMethod change the current method > makes this more > difficult. Having said that, I'm struggling to come up with a decent > example that needs you to do this. If ifHasMethod isn't > already changing > the current method, though, then I don't see anything wrong > with how we > had it before i.e. one tag to check the existence, and > another to change > the context to the new method. > > > Andrew. > > _______________________________________________ > Xdoclet-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-devel > > _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
