Friday May 09, 2008

Navigate Between Marked Occurrences

One of the dozens of interesting things I've picked up at JavaOne is... a very cool new keyboard shortcut that is in post-6.1 development builds. I.e., this is not in 6.1. You'd need to get a development build. Once you've done so, put your cursor on an identifier in your Java code, as shown below:

Great, all the occurrences of the selected identifier are marked, as in 6.0 and 6.1. Now how do you navigate between those marked occurrences? Wouldn't it be cool if you could hold down the Alt key and then use the Up arrow and Down arrow to navigate up and down the occurrences that have been marked? You can't do that in 6.1, but in development builds, that's exactly what you can do.

Vladimir Voskresensky from the NetBeans C/C++ development team in St. Petersburg told me about this on NetBeans Day. It's something he committed to the NetBeans sources, after having initially created it for the C++ editor. Thanks Vladimir. One thing I noticed is that the selected identifier suddenly changes while I am navigating, so that I can't navigate all the way down the list because the marked occurrence suddenly changes.

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
« May 2008 »
SunMonTueWedThuFriSat
    
2
5
7
16
20
22
25
28
       
Today