Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Symbol refactoring doesn't work on using aliases
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

CharlieGallie
New Member

United Kingdom
2 Posts

Posted - Jun 28 2023 :  5:00:16 PM  Show Profile  Reply with Quote
Given the example:
using X = int;
I cannot refactor `X` to another name - The option simply is not enabled.

Is this intended behavior? I strongly feel like this should be possible to do. Thanks.

Edit: This seems to be a temperamental issue. On some occasions it works about 10% of the time, and on other occasions it works 100% of the time. I think this is certainly a bug.

Edited by - CharlieGallie on Jul 04 2023 5:14:35 PM

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jul 05 2023 :  11:46:04 AM  Show Profile  Reply with Quote
When you say some occasions, does this seem to be code dependent? Do you have places in your code where this reliably works, and other places where this reliably fails? Or does it seem to vary in time, so the same piece of code will offer this reliably one day but not another day?

What sort of refactoring commands are you trying to use? I have tried a couple of simple tests here, and Rename is being offered quite reliably and happily on the alias for me, so I am wondering if the problem is more code dependent for you.

When Rename is not offered is Find References offered? Does it work if tried?

zen is the art of being at one with the two'ness
Go to Top of Page

CharlieGallie
New Member

United Kingdom
2 Posts

Posted - Aug 13 2023 :  10:38:52 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

When you say some occasions, does this seem to be code dependent? Do you have places in your code where this reliably works, and other places where this reliably fails? Or does it seem to vary in time, so the same piece of code will offer this reliably one day but not another day?

What sort of refactoring commands are you trying to use? I have tried a couple of simple tests here, and Rename is being offered quite reliably and happily on the alias for me, so I am wondering if the problem is more code dependent for you.

When Rename is not offered is Find References offered? Does it work if tried?



I haven't found it to be code-dependent. I've found no pattern as to when this issue occurs (exception being what I mention at the end), it's like what you said where it seems reliable one day but not another, even upon the same codebase.

I'm renaming via the default Alt + Shift + R shortcut. To ensure it's not a broken keybinding, I also doing Right Click > "Quick Actions ... (VA)" > "Rename...". Using that method presents a disabled option. I can guarantee I am correctly selecting the using directive, and not doing something like trying to refactor the whitespace around it.

Finding references seems to occasionally be unreliable, but there are instances it has worked while Rename has not worked.

The best evidence I've found for any kind of consistency is I've noticed it breaks when I use the cursor to move my typing position. For example, if I use my mouse to select a using directive then use the shortcut, it does not work, and it takes quite a bit of moving the typing position with my mouse and keys for it to begin functioning again. Though please note, this doesn't happen everytime I select a using directive with my mouse, and on the days where the issue doesn't seem to occur, this does not trigger the issue either.

Of course I have no information on how Visual Assist implements this, but given the behavior I've experienced, it seems Visual Assist believes the typing position is elsewhere than where it truly is, and when I try to perform a Rename operation, it does not find a symbol wherever it thinks it is. Again, this is all speculation.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 14 2023 :  09:05:04 AM  Show Profile  Reply with Quote
VA not picking up the caret position correctly would certainly explain what you are seeing.

If you look at VA's Context and Navigation fields, what are they showing? These are normally found at the top of the editor window and are where the Alt-M list appears from. These should update as you move the caret through the file, so if they are showing the wrong information this will clearly show that, somehow, VA is not correctly picking up your movement of the caret.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000