2025-12-16 2:46 AM
Background: I have designed a new PCB, which includes a chip similar to one I've used on other PCBs, but with a different part number. The function names for this chip start with the part number.
As mentioned, the new project uses a slightly different chip, with a different part number. To not start from scratch, I copied the chip-related files from a different project in the same workspace, and changed the function names. I used Refactor -> Rename to rename the functions, so it would do the source and header files in one go.
But renaming didn't stop with the new project. It renamed identical function names in the older projects as well. All files where these functions were mentioned, were updated and saved. So now I have a file restoring task ahead of me. Thank Goodness for a cloud service with a file version history.
Question:
How do I avoid this in the future? I would very much like to limit renaming to a single project. But the only setting I have found regarding this is here:
This is how it was set up when I did the renaming. Or so I believe – I didn't actually open the window until I had discovered the accident.
My guess is that I should have set it up like this (below) but can anyone confirm it? Or are there some other settings that I simply haven't found?
Any help will be appreciated.
Solved! Go to Solution.
2025-12-16 7:01 AM
@EThom.3 wrote:Errr... I'm not sure why a reply has been marked as a solution, as nothing has actually been solved.
I still believe that the feature does stuff it shouldn't do.
Perhaps you clicked on a wrong button? Generally only the topic starter can accept the solution. Unless a moderator intervenes. You can unmark it as a solution.
2025-12-16 7:17 AM
@unsigned_char_array wrote:
You can unmark it as a solution.
Indeed.
@EThom.3 - instructions here. Still works if the "solution" was marked by a moderator.
2025-12-16 11:06 PM - last edited on 2025-12-17 2:19 AM by Andrew Neil
Hi guys (and, if possible, gals)
I have just had a look in the STMCubeIDE manual, as opposed to just the built-in help function. And I found this:
So, as it turns out, this isn't actually an error. But, in my opinion, a somewhat impractical (and sometimes dangerous) functionality.
I apologise for the inconvenience. Have a great day.