PlanetSquires Forums

Support Forums => WinFBE - Code Editor and Visual Designer => Topic started by: SeaVipe on March 28, 2020, 02:37:24 PM

Title: Find In Files. Search Option
Post by: SeaVipe on March 28, 2020, 02:37:24 PM
Hi Paul, Is it possible to include "In Project" the the Find In Files search box?
Title: Re: Find In Files. Search Option
Post by: Paul Squires on March 28, 2020, 04:25:47 PM
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.
Title: Re: Find In Files. Search Option
Post by: Paul Squires on March 29, 2020, 11:02:19 AM
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.
Title: Re: Find In Files. Search Option
Post by: SeaVipe on March 29, 2020, 01:49:27 PM
Thanks, Paul, you've made my day!
Title: Re: Find In Files. Search Option
Post by: Paul Squires on March 30, 2020, 12:46:37 PM
I've added a couple more options so now you can search:

[ ] Current Document
[ ] All Open Documents
[ ] Current Project
Title: Re: Find In Files. Search Option
Post by: Paul Squires on March 31, 2020, 11:22:26 AM
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.
Title: Re: Find In Files. Search Option
Post by: Paul Squires on March 31, 2020, 11:35:05 AM
...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.
Title: Re: Find In Files. Search Option
Post by: Paul Squires on March 31, 2020, 11:46:43 AM
Looks like there are lots of command line greps available. I'll just take some time and find a suitable one.
Title: Re: Find In Files. Search Option
Post by: Paul Squires on April 01, 2020, 08:26:06 AM
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.
Title: Re: Find In Files. Search Option
Post by: Paul Squires on April 01, 2020, 06:02:30 PM
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.