Author |
Topic |
|
legalize
Tomato Guru
USA
119 Posts |
Posted - Feb 05 2010 : 6:20:49 PM
|
When I'm doing a rename on a commonly used symbol, VAX sometimes shows me symbols that have names that are identical, but are shadowed variables or locals in another method/function that happen to have the same name.
Ideally, it would never show me irrelevant identifiers, but I understand the difficulties of identifying C++ identifier context properly, so I'm OK with selecting them from a list.
However, the list needs to really be complete and I have test cases where they aren't.
Secondly, the dialog moves the cursor to the location of each line in the dialog when you double-click on the line. However, it always puts the cursor at the top of the screen and there's no way to scroll the text in the editor window without dismissing the Rename dialog. So, in order to know if this candidate should be selected for renaming, you have to cancel the Rename dialog, examine the context, and then start all over again because cancelling the dialog lost any previous candidate selection changes you'd made.
The context should be shown with the line containing the cursor in the middle of the text editor window, giving the most number of lines above and below the line in question in order to judge if it should be renamed. |
http://legalizeadulthood.wordpress.com |
|
squidge
Junior Member
23 Posts |
Posted - Feb 07 2010 : 10:34:04 AM
|
I've had the exact opposite with 1738 - I can rename a variable and although it works some of the time, others it completely misses several uses of that variable (typically ones in header files when I rename the var in the Cpp file). |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Feb 08 2010 : 01:22:22 AM
|
About missing references: legalize: Does VA skip references in whole files or does it sometimes find some and miss others in the same file?
>However, the list needs to really be complete and I have test cases where they aren't. Can you share these test cases, or they are part of a big, "real" solution? If you can share test cases or a screenshot of a problematic area it might help identifying the problem.
squidge: Are these header files part of your vcproj? In case the answer is not: when you press alt+g over an include file name, VA should take you to that header. What happens if you press alt+g over an included header which VA completely miss in terms of references? If VA does not open the file it means cannot find it.
About examining the context: what about displaying a tooltip when you hover your mouse over a reference, like find references does? |
|
|
legalize
Tomato Guru
USA
119 Posts |
Posted - Feb 08 2010 : 03:30:21 AM
|
The test suite is available for download as described in this thread: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=8732
I'm happy to report these issues as individual bugs, but there doesn't appear to be an actual bug tracker I can use to file bugs, just this forum.
As far as the context goes, I really don't think a tooltip is going to cut it. The point is that you need to examine the code to find the context of the instances and there's no real way to do that without losing the work that you've done identifying other instances. |
http://legalizeadulthood.wordpress.com |
Edited by - legalize on Feb 08 2010 03:32:08 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Feb 08 2010 : 09:42:35 AM
|
My concern about making the Rename dialog non modal is what happens if you edit the code after triggering the rename dialog?
If you trigger Find References instead of Rename you will get the same list of references, but Find References is designed to let you examine each of the references in detail.
The list of references in the Rename dialog is intended as a quick overview and sanity check, rather than a start point for a detailed check of each of them. Of course, this is based on the assumption that Rename is fairly accurate. Most of the time it is, but there are some problem edge cases, as you know. |
zen is the art of being at one with the two'ness |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Feb 08 2010 : 1:48:30 PM
|
quote: I'm happy to report these issues as individual bugs, but there doesn't appear to be an actual bug tracker I can use to file bugs, just this forum.
We accept bug reports through the forum. I did not follow the thread before you mentioned but reading feline's comment, she takes care of your collection |
Edited by - accord on Feb 08 2010 1:52:11 PM |
|
|
legalize
Tomato Guru
USA
119 Posts |
Posted - Feb 08 2010 : 3:03:11 PM
|
I don't know that you need to make the dialog non-modal. But as it stands, just position the cursor at the center of the edit window instead of at the top and it would be better.
Either make Rename better so that it only shows the relevant identifiers, or fix the context action when you double-click on an entry in the list box, or both. |
http://legalizeadulthood.wordpress.com |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Feb 15 2010 : 3:05:24 PM
|
I have put in a feature request to scroll the editor and vertically centre the current line when double clicking on an item in the Rename dialog:
case=39775
Making rename better is something we are working on. Rename and Find References should work well most of the time, but there are edge cases that can confuse it. We need to fix these without breaking other things along the way. |
zen is the art of being at one with the two'ness |
|
|
legalize
Tomato Guru
USA
119 Posts |
|
|
Topic |
|