简体   繁体   English

Android Studio重命名,没有重构

[英]Android Studio rename without refactor

So, I want to rename a file in android studio (layout/resource files, etc...), but I want to do it safely. 所以,我想重命名android studio中的文件(布局/资源文件等),但我想安全地做。 Basically, I want to rename without refactoring. 基本上,我想重命名而不重构。 I will take care of errors that come afterwards, but I don't want Android Studio to wreck havoc on some files that might not even have relations with the current file. 我会处理之后发生的错误,但我不希望Android Studio破坏一些甚至可能与当前文件无关的文件。

Basically, I want control on the renaming. 基本上,我想控制重命名。 A simple file rename. 一个简单的文件重命名。 Is there a way to do it without having to go to Windows Explorer? 有没有办法做到这一点,而无需去Windows资源管理器?

There's two options and both inside the Refactor menu. Refactor菜单中有两个选项。 The Refactor> Rename option is exactly what you don't want the other one Refactor> Rename File option is just what you want. Refactor> Rename选项正是您不希望的另一个Refactor> Rename File选项正是您想要的。 Also when using Refactor> Rename it will show you the Refactoring Preview . 此外,当使用Refactor> Rename时 ,它将显示Refactoring Preview There you see and select what is going to be affected by this change. 在那里,您可以看到并选择受此更改影响的内容。 To see options just right click 只需右键单击即可查看选项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM