2021-03-18 06:52 AM
When I refactor a global variable or function from its definition in a source file, all instances are replaced except the declarations in the header files.
Attempting to refactor from the header file achieves nothing. The new name is immediately replaced with the original name.
This is not ideal.
Does anyone know why this might be happening? A bug, or a project configuration error?
Cheers.
2021-03-19 01:36 AM
Where this header files are located, in source folder or normal? indexer see this files?
2021-03-19 01:37 AM
Where this header files are located, in source folder or normal? indexer see this files?
2021-03-19 04:30 AM
Sources are in `/module_name/src/`, headers are in `/module_name/inc/`
If I Ctrl-Click on a definition, it takes me to the corresponding declaration in the header file. Likewise, Ctrl-Tab will take me to the header file for that source file.
Checking Project>Properties>C/C++ General>Paths and Symbols>Includes I see all the project's include directories.
Ok, I've just gone out on a limb and added an `inc/` folder to the Source Location tab in the same properties page, and that seems to have fixed it. Refactoring in the header file works, and refactoring the source file updates the header file.
That's a little counter intuitive to me, though, as I now have a folder in my project marked as 'C', but it contains '.h' files. Am I missing something here?
Cheers
2021-03-19 04:34 AM
Exacly about this i was thinking, eclipse any source code operation do only on files in this type folders, this can be usefull.