Enhancement to Extract method - replace occurances of extracted code

I would really love to see this refactoring enhanced to search for and replace occurrences of the extracted code in the same fashion as Introduce variable. Yes, I know I can approximate this by stringing together:
- introduce variable on the snippet of code that I want to extract as a method (replacing all occurrences of the code snippet);
- extract method on the code to the right of the variable assignment;
- finally inline variable.

However it would be much better if the extract method refactoring provided this as an option. Even better - provide seperate options to replace occurrences in the current method, the current project, or the current solution (I'm vaguely aware that IntelliJ searches outside of the current method).

Thanks
Christian

2 comments
Comment actions Permalink

Hello,

We appreciate your feedback.

The corresponding JIRA request has been created, and you are welcome to monitor
its status at http://www.jetbrains.net/jira/browse/RSRP-34227.

Best regards,
- Development Team.


0
Comment actions Permalink

Cool and thanks!

Christian

0

Please sign in to leave a comment.