Monday, January 9, 2017

Rename multiple Java packages in Eclipse

I was in need to change multiple packages at the same time with same name.
It was actually renaming the packages one by one as I want eclipse to maintain the references intact.

I then got frustrated with this renaming and was googling for short cut. Here is what worked for me.

1.First, you must switch to Package Explorer
2. Switch from "flat" to "hierarchical" view ( Press control+F10, you could change this in the Package Presentation tab)
3. Rename the package.


Simple!

No comments :

Post a Comment