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
 VS 2022 problem with Goto and Open Corresponding
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Adequat
Tomato Guru

180 Posts

Posted - Mar 30 2022 :  1:10:38 PM  Show Profile  Reply with Quote
I have switched to VS 2022. There is a workflow killer: anytime I use the command "Open Corresponding File" (eg. open foo.h while being in foo.cpp), or using the goto command to jump from a symbol in foo.cpp to foo.h), then the file opens... but after splitting the workspace in two parts.

eg. foo.cpp is being edited, and the "Open Corresponding File" is triggered, then the workspace is split first vertically, then foo.h opens in the right panel :(

Please don't tell me this is a feature...

feline
Whole Tomato Software

United Kingdom
17816 Posts

Posted - Mar 31 2022 :  05:03:22 AM  Show Profile  Reply with Quote
To generate a "split" I am using:

IDE Window menu -> New Vertical Document Group

which moves the current file to the right hand side, and creates a new set of open file tabs. Is this what you are doing?

Testing in both VS2019 and VS2022 after using this command, triggering Alt-O and Alt-G in the right hand group will sometimes open a file in the left hand group, and vice versa. So far the trigger is if the file you are jumping to is already open on the other side, it becomes the active file, changing sides, rather than moving the open file from one side to the other.

Can you try closing the file that was opened on the wrong side, and then open it again, to see what happens when you know the file was closed? The pattern I am seeing here isn't unreasonable, but it sounds like you are seeing something different.

I am using VA 2443 in both VS2019 and VS2022, and I am using VS2022 version 17.1.1, release not preview.

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

Adequat
Tomato Guru

180 Posts

Posted - Apr 10 2022 :  08:59:30 AM  Show Profile  Reply with Quote
Please understand that I am not trying to split the view any time. I never use this split feature in any way. But the VA commands I have mentioned, do it. Something of course that does not happen with the same VA version on VS2019.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17816 Posts

Posted - Apr 11 2022 :  07:30:54 AM  Show Profile  Reply with Quote
Oh... I don't think I have ever heard of VA having that effect before, it certainly shouldn't happen.

Does this happen nearly every time, or even every single time?

If you have the time can you please try making a new, default C++ solution, adding a matching cpp and .h file to the solution, and see if you get the same problem there? I cannot see why this should be a solution specific problem, but I really don't understand why VA would have this effect either.

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

dgallo
Senior Member

28 Posts

Posted - Apr 13 2022 :  09:32:42 AM  Show Profile  Reply with Quote
I have the exact same problem, but only when the symbol is on another project (or path on disk). In that case, a new tab group is created. Open Corresponding file is ok for me as my .h and .cpp are at the same location on disk, but it always happen with Goto command, a new tab group is created.

Edit :
VA_X64.dll file version 10.9.2443.0 built 2022.01.21
VS 2022 Preview 3 (problem was here in preview 2 too)

Edited by - dgallo on Apr 13 2022 09:35:02 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17816 Posts

Posted - Apr 13 2022 :  10:33:43 AM  Show Profile  Reply with Quote
That's really strange, but at least we now have a pattern, that should help.

I am testing the same version of VA, VS2022 version 17.2.0 Preview 3.0 here, running under Windows 10, in case the OS somehow matters.

I am testing inside a solution with several projects. Starting inside a C++ CLR file, part of the project "cpp_clr_class_library", in the location:

C:\src\ManualVaTests\ManualVaTests_VS2017\cpp_clr_class_library\tests\test_cpp_clr_find_references.cpp

Alt-G is taking me to the file:

C:\src\ManualVaTests\tests\test_find_references.h

which is part of the project "ManualVaTests_VS2017", which is a pure C++ project.

From your description, this should be enough to trigger the problem, but there is no sign of it here. Should this be enough, based on what you are seeing?

How, exactly, are you triggering the Goto command? I am using the Alt-G keyboard shortcut. Going into the IDE Options dialog, keyboard settings, if I try binding Alt-G to a new, random command, so I can check the "Shortcut currently used by" pull down listbox, it shows only One entry:

VAssistX.GotoImplementation (Alt+G (Text Editor))

assuming you are using the Alt-G keyboard shortcut, do you see the same thing in the IDE keyboard settings, or is another command also bound to Alt-G?

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

dgallo
Senior Member

28 Posts

Posted - Apr 14 2022 :  02:08:19 AM  Show Profile  Reply with Quote
OK I've found the culprit : https://github.com/madskristensen/Tweakster
Disabling this extension Tweaks for Visual Studio removed the problem.

https://github.com/madskristensen/Tweakster#opentotheside may be the culprit, see https://github.com/madskristensen/Tweakster/issues/100

Edited by - dgallo on Apr 14 2022 02:45:57 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17816 Posts

Posted - Apr 14 2022 :  07:55:35 AM  Show Profile  Reply with Quote
Thank you, yes, installing this extension triggers the problem in both VS2019 and VS2022. From the description of the open to the side feature:

Another way to invoke this command is to hold down the Alt key when opening files.

Triggering VA's Open Corresponding File via the VAssistX menu does not open it to the side, but using a keyboard shortcut that uses the ALT key does.

I cannot see any sign of an option to disable this feature in the Tweaks settings in either IDE.

So, in this case, everything is actually working "correctly", since you are opening a file while holding down the ALT key, which means it should be opened in a new file group to one side.

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

Adequat
Tomato Guru

180 Posts

Posted - Apr 23 2022 :  08:50:26 AM  Show Profile  Reply with Quote
FYI, the latest Tweaks version 1.1.134 does not cause the problem anymore :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17816 Posts

Posted - Apr 25 2022 :  06:41:11 AM  Show Profile  Reply with Quote
Thank you for the update, that is going to help

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:
© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000