> On Wed, 05 Mar 2008 21:35:34 +0000, Martin Gregorie
> <martin@see.sig.for.address> wrote, quoted or indirectly quoted
[quoted text clipped - 6 lines]
> Read up on "doclets" they let you at the parsed JavaDoc to do with as
> you please.
I did so before asking this question. There seem to be no methods for
suppressing sections of the class page and no explicit support for
determining if a method is inherited or not unless you're expected to do
it by comparing the Doc representing the class a method is declared in
with the one you're processing: if there's a difference the method must
be inherited, but even then there's no obvious way of telling Javadoc to
skip it.
I get the distinct impression that doclets are for fiddling with
formatting but not for changing the output HTML structure.
I was hoping that somebody would have tried this and could confirm or
deny that it is possible.

Signature
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Stefan Ram - 08 Mar 2008 02:19 GMT
>I get the distinct impression that doclets are for fiddling with
>formatting but not for changing the output HTML structure.
I have no knowledge about the possibilities of doclets,
but if everything else fails, you can post-process the
generated HTML documents.
For example a Perl-Script to adjust URIs in generated HTML
documents might read each document to a variable »$text«
and then modify this using lines such as the following.
$text =~ s{HREF="(.*?)"}{'HREF="' . rewrite( $path, $1 ). '"'}egi;
$text =~ s{<!--[^>]+-->\s*\n?}{}g;
$text =~ s{</HEAD>}{<BASE href="$base" />\n</HEAD>};
Martin Gregorie - 08 Mar 2008 11:03 GMT
>> I get the distinct impression that doclets are for fiddling with
>> formatting but not for changing the output HTML structure.
[quoted text clipped - 10 lines]
> $text =~ s{<!--[^>]+-->\s*\n?}{}g;
> $text =~ s{</HEAD>}{<BASE href="$base" />\n</HEAD>};
A good thought. Thanks.
For that matter it may be sensible to ignore javadoc and process the
source from scratch. All we really need is something like:
<h1>[test name]</h1>
Content of the initial comment
<h2>Setup details</h2>
Content of the setup method comment plus (possibly)
any comments inside the method.
<h2>Execution</h2>
Content of the run method comment plus (possibly)
any comments inside the method.
A parser to do this should be a pretty straight forward exercise by hand
or using Coco/R.
Like javadoc we need to walk the package directory structure to find the
tests and, while doing that, generate index page(s) for the test
packages and the tests within each package, but that's also easy to do.

Signature
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |