Projucer rename .h .cpp

Hello,

In the Projucer when we rename a file that is paired (.h and .cpp with the same name) it proposes to rename the other file, but without changing the header name included in the cpp.

In a perfect world it would update all includes of the project, but at least the one in the .cpp renamed would be a great start.

The standard use cases I’m facing is to create files with projucer, and doing a mistake in the name that need to be renamed. Or changing the name later because it was poorly chosen.

Can you add this for next update please ?

1 Like

Alternatively, you could do the renaming in a JetBrains IDE (if you use one) which have great renaming/refactor tools, and then re-add the renamed files in Projucer.

… or move to CMake and ditch Projucer entirely :slight_smile:

1 Like

Thank you for your answer :slight_smile:

I have ReSharper, it’s not a big deal, it’s just that it would be an easy and handy add to the projucer ~

But this would mean that the Projucer needed some IDE-like capabilities to parse all source files and reliably find the correct occurences of the includes that need to be changed. I think this is a major task and the projucer simply is no IDE that performs all the analysis needed for such work. Just imagine the simple case that your project had multiple headers with the same name in different subfolders and you renamed one of them – then a simple search and replace operation over all source files would fail and would lead to quite annoying results…

Yeah, it’s true, this why I proposed to do the renaming at least in the paired files because it’s an easy one to search and replace