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
 Corresponding file rules?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MrDoomMaster
Tomato Guru

251 Posts

Posted - Jun 06 2016 :  4:20:12 PM  Show Profile  Reply with Quote
The open corresponding file shortcut (ALT+O) is documented here:

http://docs.wholetomato.com/default.asp?W195

What are the specific rules for how VA determines a file is "corresponding"? In the case for C++, I have the following files:

PlatformFile.hpp
PlatformFile.Win32.cpp
PlatformFile.Linux.cpp
PlatformFile.Android.cpp

Only 1 CPP is included in the project depending on the platform I'm on. In this case, only Win32.cpp. How does it know to open that file? Is there some naming pattern I have to use?

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jun 07 2016 :  2:30:39 PM  Show Profile  Reply with Quote
Basically we look for identical file names. There are rules to try and correctly handle having more than one file with the same name, so long as the files come in matched pairs we try to pair them up. But here the file names don't match, since you have added the platform to the name.

We are considering allowing you to set rules to tell Alt-O that files with different names actually match, but currently I don't have any estimates for when we might try this:

case=65732

I do have a couple of ideas though. Firstly, VA does look for "_part1" files, so if you were able to rename the files to become:

PlatformFile.hpp
PlatformFile_part1.cpp
PlatformFile_part2.cpp
PlatformFile_part3.cpp

VA would know that they were related and would either jump directly (if you only have one cpp and one hpp) or ask you via a menu which one you want to jump to. This is ugly, since you loose the platform information from the file name, but it is something that is currently built in and works.

Alternatively, depending on your IDE, you could try an IDE macro. In VS2010 and earlier IDE macros are built in. I did read that Microsoft have just released a macros for VS2013 and above as an IDE extension, but I have not played with this yet. If you do decide to look into this, this sample macro should help to get you up and running:

docs.wholetomato.com/default.asp?W439

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