[solved]cannot confirm refactor rename using enter key

Answered

I am trying to rename a variable with typo using refactor-rename, but cannot confirm by pressing enter.

What I do is:

1. place my cursor position at the word I am refactoring

2. press shift + F6

3. type a new variable name

4. press enter

It's working fine till step 3, however, at step 4, when I press enter key, variable names goes back to the one before refactoring.

Please let me know how to confirm/finish renaming.

 

[Edit: Solved]

The issue is solved when I removed project import error and reload the project.

When importing one of file name's encoding was ill, and that caused an import error. Fixing encoding of the file, and changing the ill-name of the file in CMakeList.txt, then reload the project. Done.

1
5 comments

Hello!

On what build system is your project based? How do you open it in CLion?

0
Avatar
Permanently deleted user

Its C++ with MinGW.

Af far as I remember, I imported project from existing source (New CMake Project from Source...). CMakeLists.txt file exists.

 

 

0
Avatar
Permanently deleted user

@Anna Your comment gave me a hint that the issue is project-related.

I fixed one of the target files in CMakeList.txt and reloaded. The problem no longer persists.

0
Avatar
Permanently deleted user

Anna Falevskaya @...

I am experiencing the exact same problem in the lastest CLion version (2020.2.5). However, in my case, I am not using CMakeLists but a normal Makefile. 

Renaming a variable and confirming it just resets it back. Are there any fixes for that?

0

@... how do you open your Makefile project (https://www.jetbrains.com/help/clion/makefiles-support.html)?

Do you see any warnings/error in the build tool window?

0

Please sign in to leave a comment.