-1
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:

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

}

Please provide any reference or source for implementation.

Raduan Santos
  • 1,023
  • 1
  • 21
  • 45

1 Answers1

0

You seem to be looking for the existing Inline Constant refactoring.

Not to be confused with Rename refactorings, btw.

Stephan Herrmann
  • 7,963
  • 2
  • 27
  • 38
  • If you have any reference how to do...can you please share.. I tried by using RenameSupport but it is not working.. – pv prasanth Jan 18 '19 at 05:31
  • Thanks for your help .I got the solution – pv prasanth Jan 18 '19 at 18:50
  • @pvprasanth, to make this thread useful for others, please explain what exactly you achieved with a hint on how. If re-using the referenced InlineConstantRefactoring.java is indeed part of the solution, then accepting the answer would seem appropriate :) – Stephan Herrmann Jan 19 '19 at 11:57