Thanks for the initial patch. This is a good start. I haven't run the code, but I eyeballed it. Two comments so far:
- It looks like you copied the messages in check initial/final conditions from Extract constant refactoring. Make sure to update all of the messages to something reasonable for convert local to field.
- I do see the copied code from Extract constant. Best thing to do for now is to mark each copied section with a comment. And once the functionality is there we can decide what to do. 3 possibilities really, and it's hard to say what the best option is until we see how much copied code there really is):
- Leave as is
- Extract copied code to a utility class and convert to static methods
- Extract an abstract common super class for Extract constant and convert to field. Put the common code in the super class.
With the copied code, it's best for now to mark the copied segments and change as little as possible inside of them so that when it comes time to refactor, then we will have the easiest time doing it.