Geertjan's Blog

  • September 30, 2006

Thinking of Hyperlinking... and Sinking?

Geertjan Wielenga
Product Manager
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 java.sun.com: Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 1.

Join the discussion

Comments ( 2 )
  • guest Monday, October 2, 2006
    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)
  • Geertjan Monday, October 2, 2006
    Moving backwards? Just click the left arrow at the top of the editor...
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.