Author |
Topic |
|
GregDude
Senior Member
31 Posts |
Posted - Dec 31 2013 : 01:32:58 AM
|
Sometimes when renaming multiple symbols, the Refactor -> Rename option is disabled.
I do not see a pattern to this or have a specific repro case. It happens regularly to me. (Large, C++, multi project work space.)
I simply use it successfully the first time, and when I go to use it again immediately after, the menu option is grayed out.
The work around is to restart Visual Studio. This restores functionality immediately, and always works. Another work around is to wait a while. The option *may* come back by itself after an unknown period of time. These work-arounds are inconveniently slow.
If I try to find references on a symbol I'd like to rename, while the option is disabled, I see the message "Find references is not available because the symbol is unrecognized". |
|
feline
Whole Tomato Software
United Kingdom
19025 Posts |
Posted - Dec 31 2013 : 8:19:54 PM
|
It sounds like our parser has not yet caught up with the changes to your code.
Are you seeing any status bar messages about parsing or updating intellisense? Any messages from VA should start with "VA", but the IDE's intellisense parser may also be a factor, especially if you have just updated a widely used header file.
Can you please try triggering Find References or Rename on a local variable in a cpp file, and see what happens? When you are having these problems what sort of symbol are you trying to rename? A class? A class member of some sort? Local variable? Something else? |
zen is the art of being at one with the two'ness |
|
|
GregDude
Senior Member
31 Posts |
Posted - Jan 19 2014 : 4:25:11 PM
|
Thanks Feline.
I did a big rename session the other day, here's what I found..
I was able to rename classes consistently, repeatedly and without delay. Perhaps this was parse related and it is now faster? This was my main issue last time. I have updated to the latest version since writing notes to myself to report this issue.
I can't rename member variable. Find All Refs works fine. I can't rename local variable. Find All Refs says 'The symbol *** is not referenced.'
After writing this, I notice I can consistently rename member and local variables in some files/classes but not others. Looks to be a namespace or other difference between them. |
Edited by - GregDude on Jan 19 2014 4:28:22 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19025 Posts |
Posted - Jan 20 2014 : 11:38:48 AM
|
If you have the time can you please try closing and reloading the IDE, and after loading wait to make sure that VA has finished parsing, syntax highlighting being applied to the code files is a good indicator of this.
Having done this makes sure that no previous rename or parsing run is a factor, and VA should be completely ready. Can you now try doing a Find References or Rename on one of the problem local variables please. Do you still see the problem?
From your description I suspect you will, I just wanted to make sure we had an isolated and reproducible problem.
When you say a local variable, this is a local variable inside a function is it? Not local to something else?
If we do, can you try showing VA Outline for the current file. Does the outline look correct, or does VA seem to be confused by the current file?
Namespaces have been known to cause some problems, but they should not stop VA understanding or renaming a local variable in a function. That sounds more like VA does not recognise there is a function here at all. If so this is sometimes caused by something further up the file that is confusing our parser, perhaps a complex macro or unmatched curly braces in a #if 0 #endif block. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|