Hi, I have some question about the philosohy of using merge files for plain old java code generation.
I started asking about this here in the Xdoclet In Action forum: http://www.manning-sandbox.com/thread.jspa?threadID=11401&tstart=0 Basically I sold the idea of xdoclet to management. I still need to get buy-in from Java programmers though. And knowing some of them, I know I need to make the transition as easy as possible, otherwise my xdoclet proposal will die. One area I am struggling with is with specific methods for generated classes. Consider the following scenario: (1) programmer writes foo.xdt and foo.java to generate fooFinal.java (2) The foo.xdt reads the tags in foo.java and creates the skeleton in fooFinal.java (3) we now need to implement a method bar() in fooFinal.java >From what I understand the programmer needs to create a 3rd merge file, probably foo.merge, in the merge directory. That's 3 files to maintain as opposed to 1 the old-fashioned way! The programmers I know will not like that! I am wondering why can't we make use of the foo.java file. Instead of just tags, the programmer can also put bar() implementation into foo.java. The xdt file can then just use something (psudo for now) like: <XDtMethod:forAllMethods> <XDtMethod:currentMethodContent /> </XDtMethod:forAllMethods> to merge the bar() method into the final result that is fooFinal.java. This way, programmers will only have to deal with foo.java most of the time (foo.xdt should be relatively unchanging anyway), and since foo.java is already in compilable Java class syntax, it is much more natural and IDE-friendly than a seperate merge file. I think this fits more with xdoclet's "all information generated from 1 place" philosophy, at least for the plain old Java files. So after a long-winded post, my questions: - am I off? And if it's a bad idea, why? - what are the best practices to deal with specific methods like bar()? Is merge file the way? - if I were to create a tag like the <XDtMethod:currentMethodContent/>, is it possible? Thanks in advance! Paul ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user