简体   繁体   English

如何使用 jdt 重命名字段

[英]How to rename field using jdt

Public class RenameClass{
    private static final String TITLE= "title";
    Public static void main(String [] args){
    System.out.println(TITLE)
   }

} }

By using jdt, I want to remove the field and in place of TITLE I want to rename with the value.... I want to rename like below:通过使用 jdt,我想删除该字段并代替TITLE我想用值重命名......我想重命名如下:

Public class RenameClass{
    Public static void main(String [] args){
    System.out.println("title")
   }

} }

Please provide any reference or source for implementation.请提供任何参考或实施来源。

You seem to be looking for the existing Inline Constant refactoring.您似乎正在寻找现有的内联常量重构。

Not to be confused with Rename refactorings, btw.不要与重命名重构混淆,顺便说一句。

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

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