Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding links in javadoc to source files on google code

Tags:

java

javadoc

ant

I work on an open source project that is hosted on google code. I'm using ant to create javadocs and I'd like to have links to the source files. I understand I can use the linksource flag to javadoc to include the source in the resulting html, but this isn't what I really want. What I'd prefer is to provide a link to the source file in google code's svn browser. I suppose I could do a simple filter prior to running javadoc, but it'd be even better if I could figure a way to do this right in javadoc. Ideally, I could have a property in my ant properties file like

base.src.url=http://code.google.com/p/myproject/source/browse/branches/1.2

and the javadoc command would add a line to each class's html file:

<a href="http://code.google.com/p/myproject/source/browse/branches/1.2/[package]/[classname].html">see source on google code</a>

Any ideas?

like image 215
andersonbd1 Avatar asked Nov 04 '22 16:11

andersonbd1


1 Answers

The standard doclet offers no such option, as far as I know. So it looks you either have to

  • use an alternative doclet,
  • patch the standard doclet,
  • preprocess the Java files or
  • postprocess the produced HTML.

A feature request to include this in the standard doclet might also be a good idea.

like image 154
Paŭlo Ebermann Avatar answered Nov 09 '22 01:11

Paŭlo Ebermann