Thursday November 08, 2007
Hyperlinking to NetBeans API Sources
When you're writing NetBeans modules, one of the most crucial things you need to set up is NetBeans API source navigation. There are help topics in the helpset that describe this, but I've found that few people are aware of the help topics in the IDE that relate to NetBeans module development. It is the "last but not least" section in the helpset, which in 6.0 is simply called "NetBeans Modules" (the helpset is under Help > Help Contents).
Source navigation means holding down the Ctrl key and moving your mouse over some identifier in your code. When you do that, the identifier becomes blue and underlined, like a hyperlink, and then when you click the hyperlink, the editor opens at some related point. But... this is also true in relation to NetBeans API sources. For example, here I've moved the mouse over 'TopComponent', while holding down the Ctrl key:
I click the hyperlink and the source of the 'TopComponent' class opens in the editor:
Of course, this is handy, because now I can read the Javadoc in the sources, without leaving the editor. I can also look at the other methods in the class, i.e., those that I am not using or maybe am not even aware of. However, to make this possible, you need to register a ZIP file containing the NetBeans Platform sources in the NetBeans Platform Manager, like this:
Go here and you will be on "/download/6.0/nightly/latest/zip". Many ZIP distros are found there, of the very latest build. There, get netbeans-6.0-200711080000-platform-src.zip (or whatever the name is, depending on the current date) and then put that ZIP in the NetBeans Platform Manager (which is under the Tools menu) shown above. Then you'll be able to hyperlink to NetBeans API sources.
Nov 08 2007, 06:26:27 AM PST Permalink


