Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1810: Find Symbol/References woes

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
Alexo Posted - Feb 09 2010 : 12:24:17 PM
Preparation:
Open a solution.
Open a text file, not part of the solution.
Fill the text file with names of symbols from the solution.

Trying to accomplish:
Going over the collected symbol names, find their uses in the solution.

Doesn't work at all:
In the text file, put the cursor on the symbol and click on "Find References".

Works incorrectly:
Copy the symbol name to the clipboard.
While the text file has focus, click on "Find Symbol".
Paste the symbol into the dialog.
Right click the found symbol and select "Find References"
9   L A T E S T    R E P L I E S    (Newest First)
Alexo Posted - Feb 13 2010 : 11:24:44 PM
Consider the situation when you have a large pile of source, written by somebody else, and you have to add/change functionality.
So you begin sifting through the code, making notes of "interesting" symbols which you want to revisit later.

At least, that was the case when I found out this limitation.
accord Posted - Feb 13 2010 : 2:06:31 PM
To be honest it seems a little unusual to use the form Class::Symbol in a text file and then using find references on it.
Macro is a way to implement custom needs, isn't it?

Visual Assist is designed to assist when you work with a source code rather that some txt file. Re-implementing some features in a limited form to work with text files is possible, but this is not our primary focus.
Alexo Posted - Feb 12 2010 : 5:29:15 PM
OK. I guess I could do that as a workaround but why can't VA do this when it does not recognize the file type?
accord Posted - Feb 12 2010 : 5:12:36 PM
I'm referring to the first point: I meant you can write a macro that copies the selected text then opens Find Symbol dialog and pastes the content of the clipboard. Hope I was clearer this time
Alexo Posted - Feb 11 2010 : 7:46:12 PM
Sorry accord, I don't understand.
Are you referring to my 1st point or to the 2nd?
accord Posted - Feb 11 2010 : 7:44:03 PM
Visual Assist features and context resolving normally works only in source files. Simulating copy-paste: I think it is doable via an IDE macro. You can even assign a shortcut key for it. General discussions about IDE macros that may help:

http://www.wholetomato.com/forum/forum.asp?FORUM_ID=35
sean Posted - Feb 10 2010 : 2:40:30 PM
The issue here is that the type of the active file affects the context of Find References.
case=39527
Alexo Posted - Feb 09 2010 : 2:04:10 PM
1. Find references works if I just paste a symbol into the dialog, there is context information from the source.
Why can't it do the same when I select a symbol from the text file? Just simulate a copy/paste.

2. I click on the "Find Symbol" icon and type (or paste) the symbol name
I can select an entry from the list and go to it, no problem.
I can also select an entry from the list and do a "Find References" on it, but not if the active file is a text file -- I get an empty result set in that case.
Now, if I create an empty .cpp file (not a part of the solution), make its window active and do the same, it will work, even though there is no "context from the source".
accord Posted - Feb 09 2010 : 1:37:05 PM
Find references is a highly context-dependent command. It means that you'll need the context from the source file to qualify the symbol (i.e. in which namespace or class the symbol was defined in). Without these informations, you can use Find in Files.

If you want to run find references on several symbols you can do the following:

1. create a new cpp file instead of a txt file
2. create a big function, for example:

void FindRefs()
{
}

3. Put the symbols into this function with qualifiers, for example:

Class1::Symbol1;
Class1::Symbol2;
Class1::Symbol3;
Class2::Symbol1;
Class2::Symbol2;

etc.

About find symbol: it should work. What problems do you see with this when you Right click the found symbol and select "Find References"?

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