Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android using Intellij Version 14 - Update XML References only in current XML resource file

I am using Intellij Idea Version 14 for Android development. I have recently upgraded to version 14. While editing resource XML, when I change ID of any component (e.g TextView or Button) it asks a question "Update usages as well?" "This will update all XML references and Java R field references." Clicking yes changes all files where same ID is used. Version 13 was doing only in that file. Now the name is changed in entire project wherever it is used. I do not want to change code in other files. Here is a example.

File 1: First.Java and First.XML has textview with ID textViewPersonName

File 2: Second.java and Second.XML has textView with ID textViewPersonName

Now I want to change Second.XML, textViewPersonName to textViewPersonFullName. On changing this file Intellij 14 changes all files (i.e.First.Java and First.XML ) and updates textViewPersonName in the first files to textViewPersonFullName.

How do I change only in currently used file (i.e. Second.XML) only. Is there any setting?

like image 378
Ram G. Avatar asked Jan 27 '15 19:01

Ram G.


People also ask

How do I fetch an external resource in IntelliJ?

Place the caret at the referenced URL and press Alt+Enter . From the list of suggested options, select one of the following: Fetch external resource. IntelliJ IDEA downloads the referenced file and associates it with the URL (or the namespace URI).

How add XML to IntelliJ?

Right-click the directory and from the context menu, select New | File ( Alt+Insert ). In the New File dialog, specify the name of the new file with the xml extension, for example, build. xml.

How do I beautify XML in IntelliJ?

Either open your file in the editor and press Ctrl+Alt+Shift+L or in the Project tool window, right-click the file and select Reformat Code.


1 Answers

if you refactor a id with the shortcut [SHIFT]+[F6] you can click on preview and a second window opens:

enter image description here

Here you can right click on the selected line and exclude that refactoring:

enter image description here

Hope this helps

like image 122
Wagner Michael Avatar answered Oct 15 '22 03:10

Wagner Michael