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
 Parsing files not part of project
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Adequat
Tomato Guru

182 Posts

Posted - Mar 09 2018 :  02:47:44 AM  Show Profile  Reply with Quote
I often come to this annoying situation:
I have file "foo.cpp" in my project, and I open file "foo.cpp" from an older version of my project. That is, they share most of the same symbols.
VA then parses this file too. And later, when I have closed, VA still has references to the old file.
The problem then can arise: I do a "goto symbols" and start editing the old foo.cpp by mistake.
How could this be prevented?

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Mar 09 2018 :  08:20:42 AM  Show Profile  Reply with Quote
In VA options, on the Goto page, what do you have your scope of Goto set to? Project or Solution? Does changing this to Project make any difference?

When you get this problem, are you given a choice of files to go to, or do you just get one instance of "foo.cpp" listed?

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Mar 09 2018 :  10:27:37 AM  Show Profile  Reply with Quote
when you open the other version of foo.cpp, where is it located (relative to the solution)?

also, if you close and then re-open the solution, does goto symbol still show the same behavior?

and what exact command does "goto symbols" refer to?
Go to Top of Page

Adequat
Tomato Guru

182 Posts

Posted - Mar 10 2018 :  02:07:58 AM  Show Profile  Reply with Quote
Although my solution has tons of projects, the goto scope is set to "Project".
But I also use Goto related, or even "find symbol".

When I open the other version of foo.cpp, it is never relative to the solution.

A solution could be "don't parse anything that is not part of the solution"... but I would not be satisfied either because of this:
I work with the Qt framework, and regularly debug-trace it at the source level. The Qt framework source code is out of my solution, but my projects include its headers.
In that case, I am happy that, when I open a Qt source file, it parses its identifiers and allows me to navigate among these, without any effort from my side.

Hence a solution would be:
"Only parse a file if it is part of the solution, or if it belongs to some custom directory"

Edited by - Adequat on Mar 10 2018 02:09:22 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Mar 10 2018 :  05:57:35 AM  Show Profile  Reply with Quote
Are you being taken to the wrong "foo.cpp" by Alt-g, Goto Related and Find Symbol? Or only some of these commands?

For the Find Symbol dialog, do you have "Show only symbols defined in current solution" turned On or Off? Or do you move between On and Off for this setting? With this turned On, symbols from the wrong "foo.cpp" should not be showing up.

I have tried setting up a simple test for this problem, and am focusing on Alt-g, and so far have not been able to make this happen on demand. So knowing a few more details about how and when you are seeing this problem would be helpful.

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