added reg expr to find in files from Bob

git-svn-id: trunk@3433 -
This commit is contained in:
mattias 2002-10-01 15:45:59 +00:00
parent 8e51f85372
commit db0d345d35

View File

@ -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