[lazarus] Patch: Findinfiles
Bob Wingard
bwingard at gt.rr.com
Sun Jul 27 18:35:43 EDT 2003
Mattias,
Attached is a patch file that starts the implementation of the find
in files function on the search menu. I want to make sure that the
direction that I am headed is ok with you.
I added a procedure and a function to the ideprocs.pp file. These might
be better placed in the fileprocs.pp file, you decide.
My plan is to use the messages window to display the results of the file
search. Currently I have implemented the find in directories selection
on the find in files dialog. The results are formatted in a similar
fashion to the compiler messages so the DoJumpToCompilerMessage function
treats the result like a compiler message. I am using None: as the error
type, we may want to add a Search: message type to the GetSourcePosition
function as this is the real message type.
The search function currently supports WholeWords and Case Sensitivity
but not Regular Expressions. I will add the Regular Expression search
when I understand the TRegExpr object better.The search only returns the
first occurence of the search term, once the source file has been loaded
the find next (F3) will continue the search with in the current file.
I have not made changes to the FindInFiles Dialog so you will need to
type information in each of the Edit and Combo boxes to test.
Additional thoughts.
Change the FindInFiles.TextToFindEdit component to a combo box and
share the same history file as the FindDialog.
Oh yea, there is a hard coded '/' in TSourceNotebook.FindInFilesClicked.
I have not figure out where the File Delimiter constant is declared! So
this currently only works on Linux. I could put and ifdef in, but I am
sure that this constant is declared some where I just have not found it yet.
Bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00016.zip
Type: application/octet-stream
Size: 3489 bytes
Desc: "findinfiles.zip"
Url : http://localhost/pipermail/lazarus/attachments/20030727/bf834027/zip00016.obj
More information about the Lazarus
mailing list