@inheritDoc and the NetBeans Platform

Today's question of the day comes from Honza Pozivil, who writes the following about Javadoc: "If I use Lookup (org.openide.util.Lookup), I want it to be clickable and link to the NetBeans site. Right now, it doesn't create any links to classes outside my project."

So, I downloaded the NetBeans sources from Mercurial and registered the main folder containing them like this, in the NetBeans Platform Manager:

That enabled me to use the "@inheritDoc" attribute, which works in the code completion, as you can see here:

However, when I create the Javadoc, via "Generate Javadoc" on the module, the inherited Javadoc is ignored. I.e., it isn't shown. Probably because it isn't found? And even though I have set "nbplatform.default.javadoc" in the build.properties file. And the "NetBeans API Documentation" module is installed.

PS: From the mailing list today, by Florian Brunner, this does a good job of getting the links to work correctly, though the "@inheritDoc" attribute is still not resolved.

<target name="javadoc" depends="build-init,-javadoc-init">
    <mkdir dir="${netbeans.javadoc.dir}/${code.name.base.dashes}"/>
    <javadoc destdir="${netbeans.javadoc.dir}/${code.name.base.dashes}"
    packagenames="${module.javadoc.packages}"
    source="${javac.source}"
    windowtitle="${javadoc.title}"
    encoding="UTF-8">
        <classpath refid="cp"/>
        <sourcepath location="${src.dir}"/>
        <doctitle>${javadoc.title}</doctitle>
        <header>${javadoc.header}</header>
        <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
        <link href="http://bits.netbeans.org/6.5/javadoc/org-openide-util"/>
    </javadoc>
</target>

PS to my previous PS: If you change the sourcepath in the target above, to include the sources that should have their Javadoc inherited, such as here...

<sourcepath path="${src.dir};/home/geertjan/Desktop/main/nb_all/openide.util/src"/>

...then you will have the result you required at the start of this blog entry:

Hurray!

Comments:

The current javadoc target in the external module build harness makes no attempt to link to external Javadoc sets.

Posted by Jesse Glick on March 02, 2009 at 10:44 PM PST #

Hi Jesse, it would be cool if it did so, along the lines expressed above. But no biggie if it doesn't, we need to add something along the above lines to the NetBeans Developer FAQ and then when anyone asks, they can be pointed to it.

Posted by Geertjan Wielenga on March 03, 2009 at 01:59 AM PST #

Thank you very much, Geertjan and Florian!

Posted by Honza Pozivil on March 03, 2009 at 07:42 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today