Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Refactoring XML files in Eclipse?

Is there a way to easily rename XML files in Eclipse while developing for Android so that these changes are reflected in source code?

Right-clicking on the file in package view and selecting refactor->rename changes the file's name, but does not alter references to the file within the .java source files.

like image 860
Tianxiang Xiong Avatar asked Oct 24 '22 03:10

Tianxiang Xiong


1 Answers

I realise this is an old post, but i was trying to do the same and just came up with a solution to this in eclipse:

Search -> File Search -> Replace...

Replace:Current.Style.Name

With: New.Style.Name

Thats it! Nice and easy, i didn't want to deal with the hassle of going into all my xml layouts and changing them.

like image 161
Mike Docherty Avatar answered Oct 27 '22 10:10

Mike Docherty