Refactor rename in place - confirm refactoring with return key

Answered

Suddenly, my installation of IntelliJ IDEA Ultimate shows erratic behaviour when refactoring in-place. Say I'm trying to rename class MyClass to AnotherClass, I'd normally do:

  1. Shift + F6 on MyClass
  2. Type AnotherClass
  3. Press the return key

However, on step 3, the editor inserts a newline, instead of confirming the refactoring. In the preferences, in Editor > General > Refactorings, all boxes have been ticked.

Any ideas why this is not behaving like it should?

0
7 comments

I've just installed the EAP version, but it shows the same behaviour as I described above. When I press return, it inserts a newline instead of confirm the refactoring.

0

Not reproduced for me (see the video). 

Can you share the build number? Is it #IU-193.4778.7? Share the information from **Help | Collect troubleshooting information**. 

 

0

Below versions are installed on my machine and are affected:

  • IntelliJ IDEA 2019.2.3 Build #IU-192.6817.14 September 24, 2019
  • IntelliJ IDEA 2019.3 EAP Build #IU-193.4778.7 October 23, 2019
0

Are you hitting Enter (not Cmd+Enter, or Ctrl+Enter) after renaming?
Can you try to reproduce the issue on a fresh installation (Without custom plugins and settings importing)?
Do you have the "Split Line" action assigned to "Enter"? This action could insert a line break in the function's name. 

1

So it seems that it's somewhere in my imported settings. I've did a clean install of the EAP release, without importing settings, and refactoring in place works as it should there (accidental split line is not the issue here).

I've checked the keymap, and it seems that the option Next Template Variable or Finish In-Place Refactoring did not have return assigned to it. When I added that, refactoring in place works as it should again. Thanks for the help Konstantin!

0

Please sign in to leave a comment.