Find In Files. Search Option

Started by SeaVipe, March 28, 2020, 03:07:24 PM

Previous topic - Next topic

SeaVipe

Hi Paul, Is it possible to include "In Project" the the Find In Files search box?
Clive Richey

Paul Squires

Hi Clive, I will see what I can do. WinFBE shells out to a Windows command to do the find in files in order to simplify the searching. That's why for my projects I put all of the projects files into one folder ( ie. \src ). I will see if I can just specify specific files.
Paul Squires
PlanetSquires Software

Paul Squires

Here we go - all done. It also gave me the opportunity to revisit code that I hadn't looked at for a couple of years.
Paul Squires
PlanetSquires Software

SeaVipe

Thanks, Paul, you've made my day!
Clive Richey

Paul Squires

I've added a couple more options so now you can search:

[ ] Current Document
[ ] All Open Documents
[ ] Current Project
Paul Squires
PlanetSquires Software

Paul Squires

From my tests I found out that the command that I am shelling out to "FindStr" to do all the hard work for searching files... does not support searching Unicode files. Well, WinFBE Form files are Unicode so any code in those files were not being searched. I am working on a better fix for this.
Paul Squires
PlanetSquires Software

Paul Squires

...and although the "find" command program does support Unicode, it is pretty limited otherwise. I might look for a public domain program to include with WinFBE or end up writing my own search code.
Paul Squires
PlanetSquires Software

Paul Squires

Looks like there are lots of command line greps available. I'll just take some time and find a suitable one.
Paul Squires
PlanetSquires Software

Paul Squires

I've settled on writing my own and it has been incredibly easy so far. With the use of Jose's CFindFile and CTextStream classes, this is almost too easy. Once again, if you are not using Jose's WinFBX library in your coding then you are missing out on a HUGE productivity advantage.
Paul Squires
PlanetSquires Software

Paul Squires

All finished and works great with ansi and unicode. Entire new code is about 200 lines thanks to Jose's functions. The searching is also very fast and takes into account unicode Form files that have form meta data and code generation at the start of their files (those lines are bypassed when doing the search). This is actually something that I would not have been able to do should I have opted to use an external grep type of program.
Paul Squires
PlanetSquires Software