在我 15 年的 java 项目中,不遵守标准 Java 约定,变量名的首字母通常大写。
我想将我的项目重构为小写变量名称的首字母,尤其是在方法签名中:
public void creerProfil(String CodeProfil, Profil ProfilACreer) throws Exception {
...
}
应该是:
public void creerProfil(String codeProfil, Profil profilACreer) throws Exception {
...
}
如果您有任何可以做到这一点的插件的想法,我会很高兴听到它:)
最佳答案
如果你在 windows/ubuntu 平台上使用 alt+shift+R
或者在 mac 上使用 command+option+r
。它将重构所有使用那个变量的地方。
要获取 eclipse 中可用的快捷方式列表,请在 windows/ubuntu 中使用 ctrl+shift+L
,在 mac 中使用 command+shift+l
。
关于java - Eclipse如何重构变量名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29387945/