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
 Feature Requests
 Filter "Find References Results" by e.g. Filename
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MichaelH
New Member

7 Posts

Posted - Feb 14 2019 :  07:51:02 AM  Show Profile  Reply with Quote
The "Find References" feature is very useful, but the ability to further filter down the Results is *very* lacking.

The "find in results" feature only allows to you to filter by some text string, but not e.g. by filename or class.

For example, if I want to find, say, all calls to "ScientificProgress::goBoink()" in my different XScience classes (CalvinScience, HobbesScience, SpiffScience, etc.) I still need to manually wade through all the other calls to that function from (in this context) unreleated classes. Some way to filter the results (e.g. by file and/or classname) would make life (and refactoring those calls) much easier.

accord
Whole Tomato Software

United Kingdom
3163 Posts

Posted - Feb 14 2019 :  2:16:08 PM  Show Profile  Reply with Quote
If you right click over the Find References window after VA finished searching, you can filter further. If you disable the filter "Display declarations and definitions" and keep "Display References", only the calls will remain in the list.

Edited by - accord on Feb 14 2019 2:17:10 PM
Go to Top of Page

MichaelH
New Member

7 Posts

Posted - Feb 15 2019 :  07:47:27 AM  Show Profile  Reply with Quote
The ability to filter down to only calls/only construction etc. is very useful, thanks.

Still I'd like to be able to filter e.g. only calls from classes (or files) with a specific name pattern (e.g. *Science).
I can manually remove entries I don't care about (in this particular search) from the list, but a way to apply some kind of filter (e.g. based on class or file name) would make life much easier.

For example:
The classes FooBuilder, BarBuilder, and BazBuilder, as well as FooDestroyer, BarDestroyer, BazDestroyer, FooHolder, BarHolder and BazHolder have calls to Thing::doSomething().

I wish to refactor the *Builder classes, e.g. see if it is possible to extract a common BuilderBase class which might (among other things) handle all calls to Thing::doSomething() that are currently made from FooBuilder, BarBuidler and BazBuilder. As such I do not care (in this context) about any calls NOT originating from one of the *Builder classes. I can manually remove all calls from non-builder classes, but this can get tedious if there are more than just 6 calls that need to be removed.

Edited by - MichaelH on Feb 15 2019 07:55:42 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
15980 Posts

Posted - Feb 15 2019 :  11:29:45 AM  Show Profile  Reply with Quote
In this situation, do the Builder classes currently have a common base class? Or do they just share a name and behaviour, without having any common base classes?

If they have a common base class, then you can run the Find References from the base class, and turn On the setting "Display inherited and overridden references" to find the calls that VA is picking up in the base classes.

But if there is currently no common base class at all then this ability won't help you at all.

Am I correct in assuming you are looking at function calls, rather than just declarations and implementations here? I was thinking about a form of text search in the Find References Results window, but if you are trying to filter based on the underlining types of the variables then this isn't going to help.

Are you aware you can clone a Find References Results window? This would allow you to run several different VA Find References, one per class you are interested in, and clone each result into a new tab. Not ideal, but it would be a way of separating out the information that you are looking for, and removing all of the unrelated information.

Another thought, if you want to focus just on a specific file, or a specific project within your solution, you can use the Find References in File command to search just the current file, or change the all projects / just the current project setting in the Find References Results window. I am not sure this will help, but it might help a bit.

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