Hello Serge Knystautas, Fantastic!
I think this approach will work well. Will you post your code to the xdoclet project somewhere? Or is it part of a private undertaking? If you will be posting it soon, then I can wait. (Perhaps you could point me at where it will show up...) If not, then could you please provide a sample template of what kinds of things I have to do? Or perhaps there's a pertinent example of using velocity as such in the distribution? I use webmacro for everything, so velociy should be no problem for me to read. thanks, Laramie ----- Original Message ----- From: "Serge Knystautas" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 17, 2003 10:27 AM Subject: Re: [Xdoclet-devel] How do I use xdoclet to generate (almost) normal javadoc? > I thought I sent a very similar email only a couple of days earlier, but > never saw it come through. Anyway, here are my thoughts, and what I've > done so far. > > I'm using the XJavaDoc API directly rather than through XDoclet, and > this seems to work really great (10x better than JavaDoc's API). I am > using Velocity templates to create the HTML output. I started working > through the templates yesterday, and it seemed relatively straight > forward. From what I've read, the XDoclet templating isn't as good as > other templating engines, and I'm familiar with Velocity templating. > > I've found 2 issues so far: > 1. XJavaDoc does not read package.html to provide XDoc objects on the > XPackage. If I figure out a decent way to do this, I'll submit a patch. > 2. XJavaDoc is not including line-feeds in the comment text. I came > across this because some JavaDoc we had used the <pre> tag, and > everything appeared on one line. Same thing, if I work this out, I'll > send in a patch. > > As for the linking, I was planning to create a templating object that > would take the appropriate class/package and create a link. We expect > to deal with some cross-project linking issues, so I needed to do this > anyway. > > -- > Serge Knystautas > President > Lokitech >> software . strategy . design >> http://www.lokitech.com > p. 301.656.5501 > e. [EMAIL PROTECTED] > > Erik Hatcher wrote: > > > I think, unless someone else has done this and not shared, you'll be on > > your own with generating javadoc-like output from XDoclet. It was never > > designed to replace javadoc or to generate output that matched it - > > although enough information is there to do so. You will end up writing > > your own subtask and tag handlers to accomplish this, I suspect, and of > > course the necessary templates. > > > > Erik > > > > > > On Tuesday, June 17, 2003, at 09:10 AM, Laramie Crocker wrote: > > > >> Hi, > >> > >> I posted this on the Users list a week ago with no response. Please > >> forgive > >> if this seems like the wrong forum. I've been using xdoclet and enjoy it > >> very much, but I thought this question perhaps needs to be answered by > >> developers with a little more knowledge of the system. > >> > >> I wish to extend the normal javadoc in subtle and not-so-subtle ways. I > >> can't seem to find the xdoclet task or template to simply create plain > >> javadoc, which I would think would be the best jumping off point. > >> > >> Specifically, I would like to be able to use the hyperlinks to javadoc > >> pages > >> that javadoc generates. > >> > >> The idea is that of my API, only certain members are interesting to > >> newbies, > >> so I just want a list of those methods, linked to the full javadoc. > >> > >> I *was* able to succesfully use the "info" subtask to customize a > >> three-pane > >> browser window for my tag "@dynamide.keymethod" a la the @todo example. > >> However, this is missing the links to the real javadoc. I would like a > >> javadoc-y page that filters *only* those methods with > >> "@dynamide.keymethod" > >> and produces regular javadoc for those methods. Alternatively, I think a > >> single page that had all the key methods in my classes listed, with > >> links to > >> the real javadoc (I can provide a base URL) would be slick. > >> > >> If there is no test case in xdoclet that produces vanilla javadoc, then > >> perhaps someone could point me at the correct way to generate a > >> hyperlink to > >> a method within a class that is overloaded with multiple parameters, > >> since > >> this is what javadoc is capable of. e.g., this seems to be the hard way > >> (removing some of the html brackets and putting on multiple lines > >> for email discussion ...) > >> > >> a > >> href="<XDtClass:fullClassName/> > >> #<XDtMethod:methodName/> > >> (<XDtParameter:parameterList/>)"> > >> <XDtMethod:methodName/> > >> > >> For one thing, this would generate: > >> > >> a > >> href="com.dynamide.Session#createNewSession( > >> java.lang.String urlPath, > >> boolean designMode) > >> createNewSession > >> > >> but this is incorrect, because what javadoc generates, (and what I > >> want to > >> jump to) is: > >> > >> a > >> href="/com/dynamide/Session.html > >> #createNewSession( > >> java.lang.String, > >> boolean) > >> > >> As you can see, the fullClassName method returns a dotted name, and > >> javadoc > >> produces subfolders using the package names, so slashes are required > >> instead > >> of dots. Also, the types are required, not the parameter names with > >> types. > >> I suppose I could overload the task with my own task to munge the string > >> into correctness, but this feels wrong. > >> > >> At any rate, helping me with this example might be giving me a fish, > >> whereas > >> pointing me to how to create standard javadoc would be *teaching* me to > >> fish. :) > >> > >> Any suggestions would be much appreciated. > >> > >> thanks, > >> Laramie > >> > >> > >> > >> > >> ------------------------------------------------------- > >> 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 > >> > > > > > > > > ------------------------------------------------------- > > 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 > > > > ------------------------------------------------------- > 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 ------------------------------------------------------- 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
