Tuesday Jan 19, 2010

Navigating to Sources in a Maven-Driven NetBeans Platform Project

On the NetBeans Platform course in Poznan, students wanted to know how to navigate to NetBeans sources in a Mavenized NetBeans Platform application. I asked Milos and he told me this: "When you right-click on Libraries, it has an action called 'Download sources'. By default we don't download anything on project opening, but people are free to change the settings in Tools/Options (and suffer the performance penalty)."

So, here's the menu item referred to above. Note that I have a TopComponent, which means I have a dependency on the Window System API, and then I click "Download Sources" and then the sources are downloaded. When I do Ctrl-mouseclick on "TopComponent" in my TopComponent extension class, the TopComponent class opens as below:

In the Miscellaneous category of the Options window, there's a Maven tab where you can cause the sources to be downloaded automatically (though, as Milos points out above, that will impact performance of the related UI). Hope that answers the question! More answers to other questions will follow soon.


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.


« January 2010 »