mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 23:22:08 +02:00
added reg expr to find in files from Bob
git-svn-id: trunk@3433 -
This commit is contained in:
parent
8e51f85372
commit
db0d345d35
@ -3335,7 +3335,7 @@ Begin
|
|||||||
if FindInFilesDialog.WhereRadioGroup.ItemIndex = 1 then
|
if FindInFilesDialog.WhereRadioGroup.ItemIndex = 1 then
|
||||||
begin
|
begin
|
||||||
for i:= 0 to self.EditorCount -1 do
|
for i:= 0 to self.EditorCount -1 do
|
||||||
//only if file exist on disk
|
//only if file exists on disk
|
||||||
if FilenameIsAbsolute(Editors[i].FileName)
|
if FilenameIsAbsolute(Editors[i].FileName)
|
||||||
and FileExists(Editors[i].FileName) then
|
and FileExists(Editors[i].FileName) then
|
||||||
TheFileList.Add(Editors[i].FileName);
|
TheFileList.Add(Editors[i].FileName);
|
||||||
@ -3354,12 +3354,20 @@ Begin
|
|||||||
begin
|
begin
|
||||||
MessagesView.Clear;
|
MessagesView.Clear;
|
||||||
MessagesView.ShowOnTop;
|
MessagesView.ShowOnTop;
|
||||||
|
try
|
||||||
try
|
try
|
||||||
TheMatchedFiles:= IDEProcs.FindInFiles(TheFileList,
|
TheMatchedFiles:= IDEProcs.FindInFiles(TheFileList,
|
||||||
FindText,
|
FindText,
|
||||||
FindInFilesDialog.WholeWordsOnlyCheckBox.Checked,
|
FindInFilesDialog.WholeWordsOnlyCheckBox.Checked,
|
||||||
FindInFilesDialog.CaseSensitiveCheckBox.Checked,
|
FindInFilesDialog.CaseSensitiveCheckBox.Checked,
|
||||||
FindInFilesDialog.RegularExpressionsCheckBox.Checked);
|
FindInFilesDialog.RegularExpressionsCheckBox.Checked);
|
||||||
|
except
|
||||||
|
on E: ERegExpr do begin
|
||||||
|
MessageDlg(lisUEErrorInRegularExpression,
|
||||||
|
E.Message,mtError,[mbCancel],0);
|
||||||
|
exit;
|
||||||
|
end;//on except
|
||||||
|
end;//try-except
|
||||||
//if we matched any files add them to the message window
|
//if we matched any files add them to the message window
|
||||||
if (TheMatchedFiles<>nil) and (TheMatchedFiles.Count>0) then
|
if (TheMatchedFiles<>nil) and (TheMatchedFiles.Count>0) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user