Feature Requests item #518777, was opened at 2002-02-17 07:39 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=402707&aid=518777&group_id=31602
Category: None Group: None Status: Open Priority: 5 Submitted By: Vincent Massol (vmassol) Assigned to: Nobody/Anonymous (nobody) Summary: Test XDoclet Initial Comment: Hi, Thanks for that great tool. Here is the XDoclet that I'd like to develop for Cactus (http://jakarta.apache.org/cactus), a unit testing framework for server-side java code : * Create a "@test <unit test class name - same format as @see>" javadoc tag * Have a XDoclet that would read this and add the unit test _source_ code to the documentation for that class, i.e. in the javadoc of the method/class, there would be a link to the source test. Incentive: The main idea is that unit test provide a good way to document code as provide samples of how to use a given method. Usually, existing javadoc is missing badly examples in the javadoc comments. Doing it the way I described it would bring 2 advantages : 1/ You have a suite of unit test for your code that is always up to date (you run them often in the XP way of course) 2/ You have associated documentation with examples that are always working ! Question/Feature request : * Is it possible to do with XDoclet ? Notably, is there an API to get the _source_ code ? Thanks -Vincent ---------------------------------------------------------------------- >Comment By: Andrew Stevens (stevensa) Date: 2002-02-20 05:54 Message: Logged In: YES user_id=247081 It seems to me that what you need is just a variation on the standard javadoc doclet, which in addition to the usual tags will also process the @test tags, e.g. adding a "test cases" section to the generated documentation. Of course, there's still the problem of reading the source of the test cases, but I guess there's parsers around that can do that (isn't that what xjavadoc is doing with javacc?) I'm not sure XDoclet itself is the answer, though. You don't want to generate new code based on a template, you just want the javadocs to include extra information. On the other hand, xjavadoc (being a replacement for javadoc) is a distinct possibility. Aslak, am I right in thinking xjavadoc has/will have a custom doclet API, like javadoc does? And if so, presumably we'll provide a "Standard" doclet that produces javadocs identical to Sun's (useful for testing xjavadoc, since we can run both over the samples and compare the output HTML files). In which case, perhaps we could do this FR as a sample custom doclet? ---------------------------------------------------------------------- Comment By: Vincent Massol (vmassol) Date: 2002-02-17 12:47 Message: Logged In: YES user_id=22169 Thanks Ara. It's not really about modifying a class but rather getting information about a class (including method source code snippets) and generating HTML (javadoc). I'm eagerly waiting for xjavadocs. Is there a place I can monitor its progress (or even help, if I find the time ;- )) ? CVS ? Thanks -Vincent ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-02-17 08:40 Message: Logged In: NO What you're describing is not yet possible. First AFAICS you want to modify a class, not generating a new class. That's not possible right now, you have to wait till another module we're working on (xjavadocs) is finished, you'll be able to modify classes and many other cool stuff! Also currently you can't get the source code body of a method or class or whatever, just the class structure. Again xjavadocs will make it possible. Ara. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=402707&aid=518777&group_id=31602 _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
