From db0d345d35d267a46f9964513eb9b4c195e41873 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 1 Oct 2002 15:45:59 +0000 Subject: [PATCH] added reg expr to find in files from Bob git-svn-id: trunk@3433 - --- ide/uniteditor.pp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index 935870302d..6979f5670f 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -3335,7 +3335,7 @@ Begin if FindInFilesDialog.WhereRadioGroup.ItemIndex = 1 then begin 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) and FileExists(Editors[i].FileName) then TheFileList.Add(Editors[i].FileName); @@ -3355,11 +3355,19 @@ Begin MessagesView.Clear; MessagesView.ShowOnTop; try - TheMatchedFiles:= IDEProcs.FindInFiles(TheFileList, - FindText, - FindInFilesDialog.WholeWordsOnlyCheckBox.Checked, - FindInFilesDialog.CaseSensitiveCheckBox.Checked, - FindInFilesDialog.RegularExpressionsCheckBox.Checked); + try + TheMatchedFiles:= IDEProcs.FindInFiles(TheFileList, + FindText, + FindInFilesDialog.WholeWordsOnlyCheckBox.Checked, + FindInFilesDialog.CaseSensitiveCheckBox.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 (TheMatchedFiles<>nil) and (TheMatchedFiles.Count>0) then begin