This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi All,
Probably a silly question but I've inherited some code and I'm trying to find all instances of a particular variable throughout the entire project. I've been using the Find/Replace feature but it seems to only scan the current .c or .h that I have open. Since there are a ton of files in this project and I'm not very familiar with it, I'd like to have a feature that will basically just run through all of the files in the project explorer and find this text rather than just what's open and actively displayed on the screen.
I'm not sure I've ever used an IDE that doesn't have this feature but I can't seem to expand my search in this way with CCS5.
Could someone help me out?
Thanks much
Hi Desouza,
It looks like that CTRL-H search is doing what I was hoping for except for some reason its not finding all of them. One term I was trying to search for found 2 instances...one in a .C and one in a header file. I know of one more location though at least, because I copied the entire line of code that uses this term into another location (which happens to be one of the 2 instances that the search found). It doesn't however find the original line that I copied it from in another .C file.
Any idea why the search is only finding some of the matches across different files?
Scope is set to "Workspace" in the search, I've go it set to search for "Any Element" and Limit to "All Occurrences.
Just wanted to bump this thread.
I'm still having some trouble searching for text in all my project files. See attached picture of my CTRL-H from the thread you recommended. The comment I circled is what preventing this I believe. I also tried the one tab over - File Search. It didn't even find the one match that the C/C++ Search found. I can test it out by putting text in other files and copy/pasting right into the search and it doesn't find them. Any pointers would be appreciated!
Hi,
Sorry for "disappearing"; I tried a few projects and workspaces here and was always able to see the same expected behavior as you: i.e., the C/C++ search could not find strings in inactive code.
However, trying File Search with all defaults found them without trouble - all instances (active/inactive).
My workspaces have a mix of copied and linked source files, therefore that does not seem to be the trouble.
One detail that you may try is to re-index your project (or projects). You can select one or multiple projects, then right-click and select Index --> Freshen All Files
For details about the indexer, go to menu Help --> Help Contents and search for Indexer.
Hope this helps,
Rafael