This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP432P4111: Refactor - Rename undoes an unknown number of recent code changes

Part Number: MSP432P4111

Tool/software: Code Composer Studio

Hi,

This is another report of the problem raised in https://e2e.ti.com/support/tools/ccs/f/81/t/778442.

Essentially, if I edit my code by hand for a while, then try and do more than 2 or 3 refactor-renames, CCS will fail to do the refactor (get an error dialog titled "Rename Refactoring" with message "The selected name could not be analyzed") and will undo many many of the edits I'd done previously.

I've seen this happen in CCS 7, 8 & 9 (using v9.0.1 at the moment) .

I too am reluctant to use refactor-rename for the damage I've seen it do.  Safer to manually search and replace.

Cheers

Julian.

  • Julian,

    I don't believe we were ever able to reproduce this.  Do you consistently see this?  Are you renaming the same function over and over?  I would like to reproduce this.  It is likely an issue in Eclipse/CDT.  We could get an issue filed with those projects but need to be able to reproduce it.

    In the other thread the user was using a source control system (outside of CCS).  Is the same true for you?

    Regards,

    John

  • I can't make this happen consistently.   I've only seen it when I'm working in our main project and even then I can't recreate the issue at will.

    I can't replicate the problem at all on smaller projects (say the SimpleLink example projects).

    Our main project is moderately large with 70 or so files (many with over 1000 lines) and we use SVN for source control outside of CCS.

    For a while, I suspected this might be linked to the operation of the Indexer.  I have noticed that our project is large enough that it sometimes takes the C/C++ indexer a while (10s of seconds) to complete a re-indexing when things change, particularly if I'm editing one of the larger files.  My theory was that if I refactor once, the indexer will run, and if I refactor again with the indexer running then maybe this problem becomes more likely.  However, I've not been able to reliably replicate this.

    Regards

    Julian

  • Julian,

    The issue certainly seems like a frustrating one.  I have been trying to reproduce with some larger projects but still haven't had any luck.  It seems like it could be a timing issue.  I.e. what you were thinking with the index updating or the editor noticing a timestamp change from SVN and refreshing the file.  I may see if I can get CCS setup on a very slow machine and that may make the issue more prominent.  I am going to be out for the next week and I am not sure I will be able to get that setup today.

    Regards,

    John