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
 Omit certain files from Find References results?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

owen
New Member

Canada
4 Posts

Posted - Aug 17 2023 :  3:30:11 PM  Show Profile  Reply with Quote
Many of the projects I work with use Qt. Qt has this thing of generating a companion "MOC" (meta object compiler) file for virtually every real .h .cpp file. So if I have

myproj\myfile.h .cpp

making certain Qt references, I'll also get

myproj\tmp\moc\moc_myfile.cpp

I never care about any references in the latter. How can I ask VA to omit these files from my searches? They can be identified in at least two different ways:
- always existing in a ...\tmp\moc directory
- always being named moc_*.cpp


Thanks!

(edited because the header is more relevant to the moc generation, but this is really beside the point)

Edited by - owen on Aug 22 2023 4:32:22 PM

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 18 2023 :  05:52:14 AM  Show Profile  Reply with Quote
Are you working with a solution (.SLN) file or are you opening a folder? I suspect you are working with a solution file.

I ask since VA has an option to filter out and ignore directories, but currently that setting only works when opening a folder, not when opening a solution.

Are these moc files part of the solution its self? I realise they are automatically generated, but I am not sure if they have been added to your solution, or need to be added to your solution.

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

owen
New Member

Canada
4 Posts

Posted - Aug 18 2023 :  11:02:36 AM  Show Profile  Reply with Quote
Thanks for the response. It's a solution file. The .vcxproj files in that solution are generated by a Qt tool (from a custom project file in that framework, a .pro), and do contain the moc files.

Edited by - owen on Aug 18 2023 11:03:46 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 18 2023 :  11:41:10 AM  Show Profile  Reply with Quote
I was afraid that was going to be the answer. For now there is no good method to filter these out of the Find References Results list. We are looking to add filtering out directories with a solution open fairly soon, which would help here:

case=149171

For now, if you don't have to update / regenerate your solution to often, I would try adding a new project to your solution, and just dragging and dropping all of the moc files into it. The concern with this idea is that it might break your build, but if it worked, you can either limit Find References to only the current project, or group the results by project and just delete the moc file holding project from the results list by deleting its project node.

Either a "brilliant" or a very bad idea, depending entirely on how well it works.

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

owen
New Member

Canada
4 Posts

Posted - Aug 21 2023 :  3:02:32 PM  Show Profile  Reply with Quote
Not to worry; I didn't have particularly high hopes of a solution given the search results I had on the topic (just a post here back around 2009).

Thank you for the info, and glad to hear there's a possibility of the functionality in the not-too-distant future. I may give your idea a shot at some point, though the moc files are spread across quite a few projects and the regens likely do happen often enough for me not to keep that up for long.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 22 2023 :  06:18:28 AM  Show Profile  Reply with Quote
If you have a Find References Results list that you want to work with for a while, it might be worth using the Clone Results button, so you have a result list that will stick around. Assuming the result list doesn't contain a crazy number of files, you can then right click into the results list and use "Collapse File Nodes"

At this point you can easily see the moc files and delete these from the results list. Not the same, but if its a result list you will be working with a bit, it should help quite a lot.

In case you don't know about it, in the Open File in Solution dialog you can right click to select "Display edit control for persistent filter", and using this filter and a search string like:

-\moc
to filter out all files with the moc directory in their path. Not actually related to Find References, but it will help make searching for the file you want to open a lot easier and faster.

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

owen
New Member

Canada
4 Posts

Posted - Aug 22 2023 :  4:43:04 PM  Show Profile  Reply with Quote
Smashing, I didn't know about that persistent filter (and before your previous post, that I could delete items in the find results).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 23 2023 :  05:15:32 AM  Show Profile  Reply with Quote
Glad I could help These are both work arounds, but they should help until you can filter out the moc file directories entirely.

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