cancel
Showing results for 
Search instead for 
Did you mean: 

Refactor -> Rename renames indentifiers in all my projects

EThom.3
Senior II

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:

EThom3_0-1765881474731.png

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?

EThom3_2-1765881730748.png

Any help will be appreciated.

12 REPLIES 12

@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.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

@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.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
EThom.3
Senior II

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:

EThom3_0-1765954870698.png

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.