NetBeans IDE, Refactoring

NetBeans Refactoring Support

NetBeans has some great support for refactoring Java code.Recently I stumbled upon a nice feature when I wanted to do an extract method refactoring.

This is done easily by selecting the code segment you need to extract into a method and then right click and select Refactor/Introduce Method… menu option.

But then I was pleasantly surprised when NetBeans suggested to me that there are more occurances of the code I’m extracting into the method.

This came in handy as all the duplicate code (similar to the code I selected) was extracted into a single method in a flash!


One thought on “NetBeans Refactoring Support

Leave a Reply

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

You are commenting using your 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