Thinking of Hyperlinking... and Sinking?

One of the cool features introduced in NetBeans IDE 5.0 is that of hyperlinking in the Source Editor. You hold down the Ctrl key, move the mouse over an identifier in a Java class (or in an XML file such as struts-config.xml) and then the identifier gets underlined in blue and the cursor becomes a hand. Then you can click on the link and you jump somewhere, such as to the definition of the identifier or the Java class referenced in the XML file. This is really powerful functionality for quickly navigating between files.

However, hyperlinks are not implemented everywhere you might want them to be. How about, for example, being able to use hyperlinks within HREF attributes in HTML files? I've just cobbled together a tutorial that goes into some detail on this subject, using a module I created and blogged about a few months ago. If you're interested in providing hyperlinks to your users (which is especially an interesting idea when you're providing support for a new web framework, because you might want the user to be able to navigate between referenced artifacts belonging to a framework), go to this brand new tutorial and give the NetBeans API HyperlinkProvider class a try. It is quite fun, once you know how it works:

NetBeans Hyperlink Navigation Tutorial

In other news. Have a look at how easily JAX-WS web services are created in NetBeans IDE 5.5, in this brand new article on Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 1.


the hyperlinking between classes/methode/attributes is a neat feature, but lacks one direction to be really called "navigation". There is no moving backward. in many cases i'm digging into source code trying to find the flow of action between objects, and digging using navigation forward is very useful to go to details, but when wanting to go back the reoute, i need to remember the path back. a basic navigation should be like browsers (back and forth)

Posted by guest on October 01, 2006 at 11:31 PM PDT #

Moving backwards? Just click the left arrow at the top of the editor...

Posted by Geertjan on October 01, 2006 at 11:34 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

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.


« April 2014