Source:
public void testRefactor2_renamesub ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT2 , true , true , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename package \'com.example.refactoringtest\' and subpackages to \'my.pkg.name\'\n" ) + "\n" ) + "* MainActivity.java - /testRefactor2_renamesub/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -3 +3\n" ) + " + import com.example.refactoringtest.R;\n" ) + " +\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2_renamesub/res/layout/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "* activity_main.xml - /testRefactor2_renamesub/res/layout/activity_main.xml\n" ) + " @@ -33 +33\n" ) + " - <fragment android:name=\"com.example.refactoringtest.MyFragment\"/>\n" ) + " + <fragment android:name=\"my.pkg.name.MyFragment\"/>\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2_renamesub/res/layout-land/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "* AndroidManifest.xml - /testRefactor2_renamesub/AndroidManifest.xml\n" ) + " @@ -16 +16\n" ) + " - android:name=\"com.example.refactoringtest.MainActivity\"\n" ) + " + android:name=\"my.pkg.name.MainActivity\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"my.pkg.name.MainActivity2\"\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2_renamesub/res/layout/customviews.xml\n" ) + " @@ -15 +15\n" ) + " - <com.example.refactoringtest.subpackage.CustomView2\n" ) + " + <my.pkg.name.subpackage.CustomView2\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2_renamesub/res/layout-land/customviews.xml\n" ) + " @@ -15 +15\n" ) + " - <com.example.refactoringtest.subpackage.CustomView2\n" ) + " + <my.pkg.name.subpackage.CustomView2" ) ) , true ) ; }

Target:
public void testRefactor2_renamesub ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT2 , true , true , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "[x] Rename package \'com.example.refactoringtest\' and subpackages to \'my.pkg.name\'\n" ) + "\n" ) + "[x] MainActivity.java - /testRefactor2_renamesub/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -3 +3\n" ) + " + import com.example.refactoringtest.R;\n" ) + " +\n" ) + "\n" ) + "\n" ) + "[x] customviews.xml - /testRefactor2_renamesub/res/layout/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "[x] activity_main.xml - /testRefactor2_renamesub/res/layout/activity_main.xml\n" ) + " @@ -33 +33\n" ) + " - <fragment android:name=\"com.example.refactoringtest.MyFragment\"/>\n" ) + " + <fragment android:name=\"my.pkg.name.MyFragment\"/>\n" ) + "\n" ) + "\n" ) + "[x] customviews.xml - /testRefactor2_renamesub/res/layout-land/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "[x] AndroidManifest.xml - /testRefactor2_renamesub/AndroidManifest.xml\n" ) + " @@ -16 +16\n" ) + " - android:name=\"com.example.refactoringtest.MainActivity\"\n" ) + " + android:name=\"my.pkg.name.MainActivity\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"my.pkg.name.MainActivity2\"\n" ) + "\n" ) + "\n" ) + "[x] customviews.xml - /testRefactor2_renamesub/res/layout/customviews.xml\n" ) + " @@ -15 +15\n" ) + " - <com.example.refactoringtest.subpackage.CustomView2\n" ) + " + <my.pkg.name.subpackage.CustomView2\n" ) + "\n" ) + "\n" ) + "[x] customviews.xml - /testRefactor2_renamesub/res/layout-land/customviews.xml\n" ) + " @@ -15 +15\n" ) + " - <com.example.refactoringtest.subpackage.CustomView2\n" ) + " + <my.pkg.name.subpackage.CustomView2" ) ) , true ) ; }