James Selvakumar’s Blog

November 9, 2007

Best feature in NetBeans 6.0

Filed under: netbeans — James @ 2:42 pm

You might have heard tons of information about NetBeans 6.0 in recent days.

I’m using NetBeans 6.0 Beta 2 for almost 2 weeks now for some of my development activities.
Though it had lots of new features available, the new refactoring is the feature which impressed me the most.
(Note: So far, I have used the ide for Java SE projects only)

Refactoring in NetBeans 5.5 is good, but in 6.0 it’s outstanding, i must admit.

I heard that refactoring has been improved in 6.0, but i didn’t spend time reading what were the improvements.
So when i first pressed the shortcut key to refactor a local variable, it highlighted all the occurrence of the variable in blue and when i started to change the variable name in one place, all the highlighted occurrences were changed simultaneously. This is really excellent!!!

Figure 1: All the occurrence to be refactored are highlighted.

Now when i start changing it, all the highlighted occurences change simultaneously.

Figure 2: All occurences change simultaneously

This is the view after refactoring is done.

Figure 3: View after refactoring

Great, isn’t it?

I was even more impressed when i stumbled across one more astonishing refactoring feature….

This time, i wanted to change a method name used in more than one class and what better than the netbeans refactoring?

I want to change a method name “getAESEncryptedText” to “getEncryptedText”, but this method is referred in more than one class. So when i pressed “CTRL + R”, this is what i got.

Figure 4: Refactor dialog

I wanted to have a preview of the places where this change will be effected. This is the preview offered by the ide:

Figure 5: Refactoring preview

That is outstanding. You can see exactly how the refactored code will look like in the preview pane.

I was thrilled by this offering from netbeans.

Now i’m motivated to compare the refactoring module offered by netbeans and eclipse.

Interesting times ahead for the developers….


  1. Doesn’t look like you have heard of IDEA.

    Comment by Anonymous — December 3, 2007 @ 4:31 pm | Reply

  2. …but IDEA costs real money, while Netbeans is free.

    Netbeans is as good as IDEA in many areas, better in some and weaker in a few – but its free, which makes a massive difference.

    Comment by Anonymous — December 3, 2007 @ 5:19 pm | Reply

  3. Eclipse is also free. Why not to give it a chance? 🙂

    Comment by Anonymous — December 4, 2007 @ 8:17 am | Reply

  4. I’ve used IDEA for the past 3 years dear. Please read some of my previous posts.

    Comment by James Selvakumar — December 4, 2007 @ 2:32 pm | Reply

  5. Eclipse is doing this refactoring stuff for a long time. Have a look at Eclipse 3.3, which is way cool than NetBeans.

    Comment by Anonymous — December 4, 2007 @ 2:35 pm | Reply

  6. I’ve used Eclipse for a long time now and have used NetBeans 6.0 for some time, few months actually.

    The overall Java Editor in Eclipse is still way better than NetBeans 6.0 and also more responsive. Tasks like refactoring, coding suggestion, navigation through code, tabs and classes hierarchy is smooth and more intuitive in Eclipse than NetBeans.

    But there are nice features in NetBeans especially in the JEE side (where I have spent most of my time). I found the NetBeans/Glassfish integration better than Eclipse/Tomcat. Also the wizards are very helpful when you want to prototype and play with some ideas like WebServices, Rest or EJB3.

    Comment by Handerson Gomes — December 4, 2007 @ 9:58 pm | Reply

  7. Hi friends,

    Thanks for your valuable comments.
    I’m using eclipse 3.3 as well. In my opinion, eclipse java editor is still miles better than netbeans 6.0. But this blog posting is not a comparison between netbeans and eclipse. It just explains some of the netbeans functionality. That’s it.

    I’ve published a separate article on this blog about the greatness of eclipse 3.3. Please read that as well and give your comments.

    Comment by James Selvakumar — December 5, 2007 @ 2:42 pm | Reply

    • Thought it won’dult to give it a shot. I was right.

      Comment by Trixie — May 19, 2017 @ 5:15 am | Reply

  8. Netbeans Profiler is a real killer !!! Eclipse cannot match that still..

    Try renaming a class in Netbeans from the folder view and it sucks !

    Comment by Samant — December 9, 2007 @ 3:51 pm | Reply

  9. The Netbeans Profiler eh? Try googling for Eclipse TPTP.

    Comment by Anonymous — December 11, 2007 @ 10:22 am | Reply

    • Hi Trina! I am so glad – this is exactly why I love adding recipes and tips on the site – let em know how the biscuits turned out for you and also check the recipes for more types of bicusits!

      Comment by Janine — May 19, 2017 @ 5:18 am | Reply

  10. This automatic renaming utility was present in JBuilder a long time ago, though I appreciate that NetBeans 6 is not featuring it because it’s my IDE of choice now.

    Comment by Dalton Filho — January 2, 2008 @ 4:42 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply to Dalton Filho Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: