I guess this is the point of the task I am working on. Not to cast any aspersions -- I do understand the realities of software development, and hey, xdoclet is FREE -- but the XJavadoc comments and examples are just a little bit "thin". I did stare at the classes you mentioned, and couldn't see how to get started.
The task I'm working on would allow anyone to list the "key methods" of their api by simply defining the name of the key method tag -- in my case @dynamide.keymethod. The developer would point the tool at the source, and out would come a nice page with just the key methods a user-developer needs to get started. If I can get this going using the approach you outline below, I'll post it.
Here's basically what I did...
//Prepare the XJavaDoc parser and load a source file
//you can add whatever source files you want
XJavaDoc doccer = new XJavaDoc();
File sourceFile = new File("c:\\foo.java");
doccer.addAbstractFile("foo", new XJavaDocFile(sourceFile));//Expose the XJavaDoc objects to velocity with a context
VelocityContext context = new VelocityContext();
context.put("doccer", doccer);
XClass xclass = doccer.getXClass("foo");
context.put("xclass", xclass);//Use a velocity template file to render it
Velocity.init();
File template = new File("d:\\class-template.vm");
Velocity.evaluate(context, out, "testing", new FileReader(template));That sends the output to a Writer named out (this was in a JSP for testing)
I'm not sure how you're tagging key methods, but you could get a list of the XMethod objects and see if the appropriate tag is there, and then iterate appropriately. You could either prepare this as a List in Java code and then pass it to the velocity template, or just write this in Velocity scripting (sometimes a bit harder).
-- Serge Knystautas President Lokitech >> software . strategy . design >> http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED]
------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
