Refactor rename broken in Intellij IDEA

Following step worked for me:

From your IDE, go to: Preferences -> Project Structure -> Add Content Root, then select the folder you want to use.


There is no way to turn refactoring off in the settings. My guess is that the project's cache/indexes are corrupted. I had a case once where refactoring, especially renames, stopped working. A re-index solved it for me. Go to File >Invalidate Caches, invalidate your caches, restart IDEA, and let IDEA re-index the project (progress is shown in the bottom status bar right of center). Then try the refactoring.

If that does not solve it, take a look in the logs (Help > Show Log) and see if there is any indication in there as to the cause of the issue.


Fo all the MacOS users, do not forget to access Settings -> Keyboard and turn on the flag for the option Use all F1, F2, etc. keys as standard function keys. E.g.:

enter image description here

Otherwise IntelliJ will not get the focus to use the F4 key.