Reputation: 12112
How can I link to a specific section in a package-info.java
file from Javadoc in other places?
The section could specified with a <a name="section-name">...
tag, then the produced link should have a ... /package-summary.html#section-name
URL. But other ways of specifying sections are also interesting.
Requirements:
It must be possible to link from packages other than the one documented with package-info.java
file.
URLs relative to the link source (like ..\..\p1\p2\package-info.java
) can not be used, since they would be so hard to maintain.
The link should (preferable) be understood not only by a web browser but also by IDEs (most importantly Eclipse) in their auto-generated, pop-up rendering of Javadoc.
I think the only way to achieve this would be to not use href
and instead use{@linkplain}
, but I can't figure about how to specify a section.
Upvotes: 0
Views: 57
Reputation: 12112
It is possible to do this with a href
and the @{docRoot}
tag:
<a href="{@docRoot}/p1/p2/package-summary.html#section-name">Section Name</a>
This doesn't fulfil requirement 3 though, since in Eclipse following such a link opens a web browser instead of the build in Javadoc viewer. So if anyone finds another solution I'd be grateful.
Upvotes: 1