How to stop / abort / cancel Find in Files?

Find, replace, find in files, replace in files, regular expressions

How to stop / abort / cancel Find in Files?

Postby toddm » Thu Jan 24, 2008 10:25 pm

I love that find in files now runs in the background, but I started a particularly long search and want to stop it. How do I do this?

Thanks.
User avatar
toddm
Advanced User
Advanced User
 
Posts: 83
Joined: Wed Jul 28, 2004 11:00 pm

Re: How to stop / abort / cancel Find in Files?

Postby jorrasdk » Fri Jan 25, 2008 8:00 am

When the Find in Files search is running the menu item Search - Find In Files changes to Search - Cancel Find In Files.
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: How to stop / abort / cancel Find in Files?

Postby toddm » Fri Jan 25, 2008 2:50 pm

Thanks.
User avatar
toddm
Advanced User
Advanced User
 
Posts: 83
Joined: Wed Jul 28, 2004 11:00 pm

Abort search in files and folders

Postby foto50 » Sun Jul 08, 2012 8:08 am

Hi all

Recently in UE I started a search in files (including subfolders) by a stupid mistake and ended up getting more than 20k results in 4k of files. Not just the searching took ages, even the displaying took quite a long time :lol:

Is there any keyboard shortcut where I can abort such a mistaken search?

Greetz
FoTo50
User avatar
foto50
Basic User
Basic User
 
Posts: 11
Joined: Mon Sep 27, 2004 11:00 pm
Location: Kitz

Re: Abort search in files and folders

Postby Mofi » Sun Jul 08, 2012 10:44 am

Yes, press the hotkey used to open Find In Files dialog. In case you have opened the Find In Files dialog via click on menu item Find in Files in menu Search or by clicking on the symbol of the command in the toolbar, click on menu item or symbol again. If a Find/Replace in Files is running, the menu items Find in Files and Replace in Files both change to Cancel Find/Replace in Files in menu Search to indicate that the background process of finding/replacing in files can be canceled by executing the command again. That a Find in Files is running can be seen in prompt area on left side of the status bar at bottom of the main window. This area shows the standard text For Help, press F1 after canceling the background thread.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: How to stop / abort / cancel Find in Files?

Postby edwardd » Fri Dec 21, 2012 12:26 pm

If I start a really time consuming search that returns lots of result (>20K), I cannot interrupt it. If I try to click on the Search menu item in order to select Cancel Find in Files, there is no response until the search completes. I really need a real interrupt. Any ideas?
thanks
E
User avatar
edwardd
Newbie
 
Posts: 3
Joined: Tue Jan 11, 2005 12:00 am

Re: How to stop / abort / cancel Find in Files?

Postby Mofi » Fri Dec 21, 2012 1:35 pm

edwardd, there is no other method than executing Cancel Find/Replace in Files to stop Find in Files.

I don't see a problem. I'm using UE v18.20.0.1028 on Windows XP SP3 x86 and UltraEdit cancels the search respectively write to output window within 3 seconds.

I used following options for verification of cancel process:

Find What: body
Search In: Files Listed
In Files/Types: *.html
Directory: root directory of the local copy of a website with in total 1046 HTML files

Match Whole Word Only: not checked
Match Case: checked
Results to Edit Window: not checked
Regular Expressions: UltraEdit: not checked

Display lines that do not match: not checked
Match files if string is not found: not checked
Use Encoding: not checked

Subdirectories to ignore in search: none
File names/extensions to ignore in search: none

Search Subdirectories: checked
Ignore hidden Subdirectories: not checked
Open matching files: not checked

Perhaps the behavior you complain about with stopping Find in Files taking longer to occur happens only under some conditions. Therefore it would be good if you post which parameters you use for the Find in Files which does not cancel within a few seconds.

From what I could see and what makes sense from a programmers point of view is that the thread running the Find in Files checks on the cancel signal from UltraEdit main task only before the thread continues with the search on next file. There is no check on cancel while a search within a file is in progress, most likely because all the find functions are standard subroutines not designed at all for receiving signals as threads. So if you use a Find in Files which finds lots of lines in a very large file with hundred thousands or millions of lines, you have to wait until this file is completely processed and the find function returns, so that main task of the thread can evaluate the cancel signal and terminate.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: How to stop / abort / cancel Find in Files?

Postby edwardd » Mon Jan 14, 2013 9:31 am

All my search settings are the same except one. I think it may have to do with this:
Results to Edit Window: CHECKED

It cannot be interrupted while it is trying to write the results to the UI. I also noticed that once the search is complete, there is some secondary process that happens, during which time the app is frozen and the screen flashes several times. Once it's done with whatever it's doing, I can examine the results without a problem.

Thanks,

ed
User avatar
edwardd
Newbie
 
Posts: 3
Joined: Tue Jan 11, 2005 12:00 am


Return to Find/Replace/Regular Expressions