• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javadoc, how to @link to a package, not a class within the package

 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to provide links to packages from within my javadocs.

{@link admin} fails

as does

{@link com.whatever.admin}

This works:

@see admin

But it is tied into the fact that the current doclets generate a base file named "package-summary.html" and will break when the doclets change.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if the label in the @link tag is optional - is it? Try
{@link com.whatever.admin admin}
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Steve Luke wrote:I'm not sure if the label in the @link tag is optional - is it? Try
{@link com.whatever.admin admin}



no joy.
but {@link com.whatever.admin.WonderfulClass} works great. But I don't want to link to the class, just to the package.
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the link to a link about @link. Click the link and see what it links to. I haven't read it yet. Using ctrl-f-link may give additional useful information.
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Here's the link to a link about @link. Click the link and see what it links to. I haven't read it yet. Using ctrl-f-link may give additional useful information.



What is says is: "Inserts an in-line link with visible text label that points to the documentation for the specified package, class or member name of a referenced class. "

which says that you can link to a package. But all of the examples are in the "package.class" model, and I've tried every format that I can think of to make the reference to just the package work.
 
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone ever find an answer to this? I'm having the same problem right now.
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, as a workaround, if you wanted to say something like this in your javadoc comments:


This would have the same effect:


But it's not as tidy and, imho, should not be required. (Note that NetBeans, the IDE I am using, adds a "package-info.java" file to your package, to hold your package-level javadoc, but the HTML it creates from that is written to package-summary.html.)
reply
    Bookmark Topic Watch Topic
  • New Topic