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?
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).
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.
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.
if you refactor a id with the shortcut [SHIFT]+[F6] you can click on preview and a second window opens:
Here you can right click on the selected line and exclude that refactoring:
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With