Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Omit certain files from Find References results?

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
owen Posted - Aug 17 2023 : 3:30:11 PM
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)
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 23 2023 : 05:15:32 AM
Glad I could help These are both work arounds, but they should help until you can filter out the moc file directories entirely.
owen Posted - Aug 22 2023 : 4:43:04 PM
Smashing, I didn't know about that persistent filter (and before your previous post, that I could delete items in the find results).
feline Posted - Aug 22 2023 : 06:18:28 AM
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.
owen Posted - Aug 21 2023 : 3:02:32 PM
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.
feline Posted - Aug 18 2023 : 11:41:10 AM
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.
owen Posted - Aug 18 2023 : 11:02:36 AM
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.
feline Posted - Aug 18 2023 : 05:52:14 AM
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.

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