Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Corresponding file rules?

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
MrDoomMaster Posted - Jun 06 2016 : 4:20:12 PM
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?
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 07 2016 : 2:30:39 PM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000