Bracket Matching Improved

I can almost not believe that it has been a month since the release of NetBeans 7.2! Time flies indeed. This week I decided to download the latest development build to experience first hand what the NetBeans development team has been up to since.

As soon as I opened the first Java source file in the new version (I am using the development build from 20 August 2012), it struck me that something looks different. I couldn’t place it at first, but then when I selected a bracket something new and useful appeared. 🙂 Bracket matching has been around for some time, so lets look at what the bracket matching in 7.2 looks like. (The source code shown here comes from the NetBeans Platform splash screen, from a NetBeans 7.2 dev version.)

Bracket Matching in NetBeans 7.2
Bracket Matching in NetBeans 7.2

So in short, when you select a bracket the matching one gets highlighted in yellow. That is very useful indeed. However, in the development versions another cool feature was added.

Brackets in NetBeans Development Build (20 August 2012)
Brackets in NetBeans Development Build (20 August 2012)

In the margin, you can now see an extra bracket (indicated by the arrow in the screenshot above) that shows you how far the block contained in the brackets stretches! This definitely makes the information more visible.

Edit (29 August 2012): I noticed an even more awesome part of this feature today! If you have the closing bracket selected with the line where the bracket was opened scrolled outside the current view, it will show up at the top of the file! See the screenshot below.

Showing the Opening Line
Showing the Opening Line

Instructional designer, educational technologist and occasional lecturer who loves travel and photography

1 thought on “Bracket Matching Improved”

Leave a Comment