CLion refactoring not working

I have a problem with refactoring, for example. Renaming classes in CLion. CLion shows me refactoring windows, but finds nothing to refactor. Screenshots added. I also tried adding header files to CMakeLists, but to no avail. Do you know what I have to do?
Thanks. enter image description here enter image description here

Edit: I am using Debian 8.2 x64 with Cinnamon

+5
source share
2 answers

I just added all the .h files in CMakeLists.txt to set(SOURCE_FILES ....) and now its work is fine. Thanks VR.

+9
source

If the renaming does not work, this may be due to the fact that your project will not be successfully created. Try this with a simple project, for example. create a brand new Hello World program. I am sure that if it works successfully, refactoring will work. Worked for me in CLion 1.2.4 on OS X 10.9.4.

As for CMakeLists.txt , this is a standard file that CLion automatically creates if you create a new project. If you have an existing project, you will find CMakeLists.txt if you open the menu View->Tool Windows->Project .

My advice is to experiment by closing an existing project ( File->Close Project ), creating a new project and playing with CLion functions. Here is a nice Quick Start Guide for CLion

+3
source

Source: https://habr.com/ru/post/1239822/


All Articles