Find Text / Find Usages / Replace Bugs & Enhancements (As of 5131)

There was a topic recently "Find without scrolling?!" which sparked
my interest again about all the Jiras languishing in IDEA swamp and
IDEABKL dump. So, I did a search of Jira for a search Jira for
requests related to Find / Replace / Find in Path / Find Usages, and
lo and behold, once again there was a treasure trove of good ideas.

Following is a summary of requests related to Find, Replace, Find in Path, Replace in Path,
Incremental Search, and Find Usages.

Earlier Topics:
JSP Requests:
Inspection UI Requests:

Comment actions Permalink

General UI

    • Useability: The editor should have option to not recenter the

caret row when going to next of Find, Incremental Search, etc.
When there are multiple matches on the screen, each time you goto
the Next Match, you have a short moment of unnecessary confusion
each time because I need to grasp where in the code I am. (Vincent
Mallet, IDEA- 1801) (Stephen Kelvin, IDEA-6750)

I recommend the default should be recentering turned off, since
that will create the least problems for new users since most
editors don't recenter continuously. JBuilder only recenters if
offscreen; Netbeans only recenter if offscreen and only moves
minimal amount so that 5 rows from top/bottom edge.

See recent thread

Also, the debugger shouldn't recenter the editor when the execution
point advances (No Jira #)

    • Enhancement: Highlight all occurrences of the current search

phrase in the Editor and the Editor guttter. The effect should is
similar to CTRL+ SHIFT+F7 but applied automatically whenever you
are doing incremental search, Find, Replace, Find in Path, Replace
in Path. I recommend you define a user-configurable style for
Search Current Match and Search Other Match. See attached
screenshot of how Netbeans does this. This is Applicable to
Incremental Search, Find Text, and Find in Path. By default, this
feature should be enabled, since it gives a better initial user
experience; I believe more would like this feature than not
because it only happens when you are actively searching, not all
the time when your cursor is on a word. (Michael Kirby,IDEADEV-2997)

Find Usages could also do this, but needs to highlight only the
actual usages and not other text which happens to match. (Could
match the keyword in comments if the user enabled that option.)

    • Enhancement: IDEA Find Usages and Find in Path should make best

effort to jump to source for INVALID items (AlexL,IDEADEV-2610)

Often I will perform a Find Usages or Find in Path to find some
method / code / etc. with the intent to change it to something
else. As I step through each find result line item, I jump to
source and then modify the code. Now once I change that line, the
Find Results window marks the item as INVALID.

Often, when I go to the next item to modify it, I want to go back
and copy what I had added to one of the previous items. But since
the previous items are INVALID, I can no longer jump to source by
clicking on the item.

What I would like to see is that IDEA continue to mark the items
as INVALID, but go ahead and make a best effort to jump to the
source code line. The simplest implementation is to just jump to
the original line number when the search was done.

Looking at the attached screenshot you can see that even for the
INVALID items, IDEA still remembers the file, line number, and
column number of the item.

    • Useability: Find / Replace / Find in Path / Replace in Path

doesn't support editor keymap for editing the 'Text to find' and '
Replace with' textfields.

It is very annoying that I cannot do CTRLLEFT_ARROW,CTRL
RIGHT_ARROW to navigate and CTRL+BACKSPACE to delete word. Also,
certain keybindings are hardcoded like CTRL+A to select all. I
have a Emacs- like keybinding where CTRL+A is Move Caret to Line
Start and CTRL+E is Move Caret to Line End. None of this stuff
works in those textfields. Editing in the textfield should be just
like editing a line of text in the editor. (No Jira#)

    • Useability: "Open in new tab" checked by default (Ian Zabel,IDEABK-355)

Having to keep checking that 'Open in new tab' checkbox in the Find in Path
and Find Usages dialog is starting to get real old. The dialog saves the state,
but not after you restart. Can you make this a user preference?

  • Cosmetic: Use the Editor Font in the Find/Replace textfields so

that the text you are searching for looks the same as the text
being searched ( Editor).

Some people use special editor fonts so that number 0 and other
things are more readable, e.g. Bitstream Vera Sans Mono. (Chris
Bartley, IDEABKL-107)

  • Cosmetics/Enhancement: The order of the toolbar buttons is

different some buttons are missing between Find / Inspection
Results / Locate Duplicates Results. See screenshot.


F3 should not change editor's view when re-finding single match.
(Vincent Mallet)

IDEA Find Usages and Find in Path should make best effort to jump to
source for INVALID items (AlexL)

Use fixed-width font in Find/Replace textbox (Chris Bartley)

Automatic code Refolding on search (Jon Steelman)

Incremental search should re-collapse folding regions that it opened
(Keith Lea)

finding results UI lack uniformity (see..) (Alain Ravet,IDEABKL-2675)

Being able to export search results to an XML file. (Anthony Holland)

Highlight all occurrence of the current search phrase

"Open in new tab" checked by default (Ian Zabel)

Comment actions Permalink

  • Searching/Analyzing/Inspecting tasks should all be performed in the background, similar to

Find in Path. No one wants to see the modal search progress dialogs! (See attached).

- Find Usages should run in the background like the Find in Path search does
(with that nifty new status bar at the bottom). When you run Find Usages now,
you can't do anything else until it is done.(Alejandro Gomez,IDEABKL-2299)

- Locate Duplicates should run in the background. (No Jira #)

- Inspect Code should run in the background (No Jira #)

- Analyze Dependencies, Analyze Cyclic Dependencies, Analyze Backward Dependencies,
Analyze Module Dependenciese should run in the background (No Jira #)

  • IDEA should support launching multiple search and/or analysis tasks in the background.

There should be user-configurable property to set the maximum number of concurrently
running tasks (typically the user would set this to match number of cpus or cpus -1).
The user would still be able to queue up an unlimited number of tasks to run, but only
max-concurrent tasks would run at one time.

I should be able to launch a couple Inspect Code analysis in the background, and then
a couple Find Usages, etc. If Jetbrains can implement this, it would a nice hook for
users that have dual core desktops which are becoming more common in 2006, and esp. by
the time Demetra is released.
(No Jira #)

Comment actions Permalink
  • Cosmetic: Find Usages tab names should not include the scope, i.e.

drop the "in Project Production Files" to improve readability with
a bunch of tabs. The Find Usages Tool Panel also displays the scope
in the title which should be sufficient. (AlexL,IDEADEV-2348)
(IDEA-3655 suggests putting the search term first and in boldface).

  • Cosmetic: Find in Path doesn't display the scope in the title. (No Jira #)

The Find in Path labels each tab as "Occurrences of 'keyword'" and
doesn' t include the scope in the tab name or the title. I like it
not being in the tab name, but it should be in the title.

  • Should support copy directly from the find results, so you can

copy snippets of code without loading the file into the editor pane.
( Jon Steelman, IDEABKL-598)


Find panel tabs: word order should be changed (Dave Yost)

Add Copy functionality to Find panel

Find Usages tab names should not include the scope, i.e. drop the "in
Project Production Files" to improve readability with a bunch of tabs (AlexL)

Comment actions Permalink
  • Performance: Find Usages appears to have great potential to be speeded up.

(IDEABKL-2652,Nir Mardiks) (IDEA-4800,AlexL) (IDEA-5767,Etienne Studer)

The Find Text/whole words feature in 5.0 is a huge time saver. I am wondering
if there are opportunities with Find Usages to make similar improvements?
I for one am willing to use more disk space/ memory cache in order to make
this faster. Find Usages can take minutes on large projects.

- Currently when trying to look for a particular method's usages,
if the name of the method is a common one - like delete, add or
some other general name, the search takes alot of time. I think
this can be easily limited if the search would limit itself for
usages in the files using the particular class (usually these are
classes that do not have many usages: 10 - 15) This could
drastically improve performance on these cases... I'd like to point
that usages for the class are really fast...

- Regression in 5.0 performance vs 4.5 Find Usages on methods is 2X
to 3X slower than 4.5 on some methods for me.

- Strange Discrepancies in search times
+ a long wait to find usages for a member which is private or

  • Bug: Find Usages with include overloaded methods should list all of

the methods at the top. Currently, only the method you invoked Find
Usages on is displayed even though the results lists usages of all
the overloaded methods. (erb,IDEA-2635)

  • Bug: Find Usages of a class /methods does not show usage of default

contructor. (Dmitry Peshehonov,IDEABKL-1001)

  • Enhancement: Find Usages/class - When searching for usage of a

class in project, it shouldn't show usages within the class itself
by default. ( Konstantin,IDEA-1418)

  • Enhancement: Find Usages/method -- Find entry points to a method.

(Is this already possible somehow? -Alex)
I would like to find only usages of method x() if the usage
contains a code entry point that doesn't include x(), i.e. exclude
calls to x() from within x() if x() calls y() and y() calls x() (
and no other code path calls y()) (Doron Rajwan, IDEABKL-1033)


Search usages for class returns usages within class itself for Project
scope (Konstantin)

Find Usages/include overloaded methods: list all in results (Erb)

Problem with finding usages on setName() and getName() (AlexL)

Find Usages - performance improvement suggestion (Nir Mardiks)

'Find Usages' often takes minutes to complete (Etienne Studer)

Find Usages of not declared default constructor finds nothing (Dmitry

Finding external usages (Doron Rajwan)

missing background option in find usages

Comment actions Permalink

Incremental Search

Incremental Search

  • Enhancement: Incremental Search should have a mini tool panel to

show possible controls like case sensitive, next, previous,
highlight all, find all (dumps alll matches in current file to the Find Results
tool panel), and cancel. I really like how Firefox has implemented this. (see attached)
You could also display the keybindings for each action. If you implement this,
then it gives you the benefits of both Incremental Search and the Find Text window at the same time.

  • Enhancement: If I invoke regular Find/Replace/Find in Path/Replace in Path window

while in Incremental Search mode, it should carry over the current search term.
I might start searching for something with incremental search, and then realize I
want to do a Find in Path, or I want to do a Find and then click the Find All button
so the results are put in the Find Results window. (No Jira#)

  • Enhancement: Incremental Search should highlight all occurrences of

the search phrase as you are typing, highlighting the current match
in one color, and other matches visible in the editor and gutter in
a different color. (This is mentioned in General section above also)
(Michael Kirby,IDEADEV-2997)


Incremental Search highlighting should work like emacs (Michael Kirby)

Comment actions Permalink

The title of the above message should have been "Find Usages". I wish there was an Edit feature on !

Comment actions Permalink

Find/ Replace / Find in Path / Replace in Path (Plain Text Search)

  • Enhancement: Should allow multiple comma separated file name filters (.jsp,.

html). Currently only accepts a single file name filter.
JBuilder has a popup which lets you multi-select from a list
of filetypes. So, you could select XML, XSL, and XHTML for example.
(Niall Smart,IDEA-5325)

  • Useability: After starting a replace, the Replace dialog pops up with "Do you

want to replace this occurrence?" Sometimes, this dialog is
covering up the text to be replaced, and you have to manually drag
the dialog out of the way. (Mert Nuhoglu,IDEABKL-3168)

  • Useability: When doing a search "Find in path" it, it brings up a dialog box if

a large file is found. Something like "A large file was found, do
you want to skip it" It does this every time I want to do a search.
It would be faster/less annoying if it just read the file. What
would be better is to have a tick box "Don't ask me this question
again" A setting to also determine what a large file size is would
be a plus. More sophisticated would be to allow you to add
individual files or directories to be excluded from searches?

(Peter Lawrey, IDEADEV-3947)

  • Bug: Find In Path incorrectly omits file extension in result view. It

makes use of the option "Hide extension in editor tabs" which is an
advanced editor option and is useful for saving space. Find results
should always display the extension regardless of this option. (
Sascha Weinreuter,IDEADEV-3330)


Allow multiple file name filters in Find in Path dialog. (Niall Smart)

Find/Replace Dialog prevents to see the found word (Mert Nuhoglu)

Find In Path incorrectly omits file extension in result view (Sascha

Search always pauses when a large file is found.

Comment actions Permalink


  • Enhancement: Should be able to find usages of an ant task. Currently you can

only goto the declaration. (Dmitry Kashin, IDEA-2847)

  • Enhancement: Find Usages of an ant property. (Rob Harwood,IDEABKL-2447)


Find usages of Ant task (Dmitry Kashin)

Find Usages on an Ant property

Comment actions Permalink


  • Bug: Find CSS Usages -> Cannot see JSP file name in results (Kirill Maximov,IDEADEV-4561)


Find CSS Usages -> Cannot see JSP file name in results (Kirill Maximov)

Comment actions Permalink

Project Panel

Project Panel

  • Bug: In the "project navigator" the incremental search over "flat" packages

doesn't work any more if you do not start from the beginning. For
example, if there is package and, you cannot get
directly (with incremental search) to the "ff" package. You have to
start typing from the beginning - In IDEA 4.5.3 it works
perfectly - it's possible to get into "ff" package immediately. (
Alexander Demidovich,IDEA-3989)

  • Enhancement: Find Usages of Library/JAR within current project. (Peter Dolukhanov,IDEABKL-2670)

I would like to select a jarfile in the Project view, and find all
all locations where it is used in my project (or user selectable


Find Usages of Library/JAR within current project. (Peter Dolukhanov,Vilmantas Baranauskas)

Regression. Incremental search over the packages list (Alexander Demidovich)

Comment actions Permalink

Find in Path Custom Language Scope

There were several requests which wanted to enhance the Find in Path to
leverages IDEA's knowledge of different languages/file types.

Here are some examples:

1) Search only in literal strings in code. This would search all literal
strings in java files and scriplets in JSP files, plus all literal strings
in javascript files.

2) Search only in comments. This would search comments in all file types
that IDEA understands the comment block, e.g. java, jsp, javascript, xml,
html, css, etc. Also, more likely, you might want to exclude searching in
all comments.


One scenario I have is that when I have want to rename/modify a CSS selector
or javascript method, I have to be real careful because we have tag libraries
and servlets which may refer to these inside java string literals.

Currently, I just do Find in Path search with whole words option, which is very
fast, but if the selector name or javascript method is a common name, then I
get a ton of matches.

I would be interested if doing a Find in Path which searched all HTML content
plus all Java/Javascript string literals.


One suggestion was the ablily to select a custom language scope similar to
the package scope that Find Usages offers. It could be presented as a tree
with all the known filetypes. For filetypes where IDEA understands the
structure, it would be further brokend down.

Java Sources
String literals
String literals
Text Files
Text files

You could name the custom language scope, e.g. "Javascript Context", or "Comments", or
"Java code No Comments", or "Strings". IDEA could even come with these predefined.

Language Scope: [ Java Code No Comments
Javascript Search
CSS Search

Argument Against:

In real use there are only a few times I have thought something
like this would have been really useful,e.g. when the css selector or
javascript method was a very common word.

Also.. I have the feeling the performance might be much much worse in
order for IDEA to accomplish this, esp. compared to the lightening fast '
whole words' Find in Path search, so that would make me much less
included to use the feature.

Overall, I'm not that hot on the idea, but I do like how it leverages IDEA'
s builtin understanding of the structure of various languages.


Ability to search in Java-Strings only (Thomas Singer,Igor Karpov,Paul

Find: would like to exclude searching in comments (Charles Lloyd)

New "Find" option enhancement request (Paul Bradshaw)

Extend find usages functionality (Dmitry Kashin)

Comment actions Permalink

During my slog through the Jira IDEA swamp and IDEABKL dump, I discovered the following issues were Fixed/Duplicate.

Add search scope to "not found" message

Make it easy to find package dependency cycles

Find in Path: should be "recursive" by default

Find Usages for CSS classes and IDs should work properly on any selector
/ id / tag in the style block declaration

Find in Path Resets Scope

Find usages & find from files do not show incremental results

Searches and TODOs should be albe to be constrained to package level

"Find usages" does not detect use of a constructor by a subclass one via
"super( params )";

Allow search results from edit window to be displyed in the find window

Duplicate (Duplicated By IDEABKL-1001)

Comment actions Permalink

New jira requests:

Debugger shouldn't recenter the caret row each time you step to the next line. (Make user preference)

Comment actions Permalink

Find / Replace / Find in Path / Replace in Path doesn't support editor keymap for editing the 'Text to find' and 'Replace with' textfields.

Comment actions Permalink

I see support for dual core CPUs could be a distinguishing feature for IDEA vs the competition. And it
is definately true that the corporations / individuals spending the $$ on dual core developer workstations
also have the $$ to spend on professional tools like IDEA.

Dual core desktops which are becoming more common in 2006, and esp. by the time Demetra is released,
so I think it is important that potentially longrunning tasks should always run in the background.
Also, users never want to see a modal progress bar; but the users with dual core workstations will be even
more miffed because they have one cpu sitting idel while IDEA is blocking input! (Unless, is it possible for
Inspect Code to utilize both cpus by inspecting code in paralllel?)

New Jira#s:

Support for Dual Core: Locate Duplicates should run in the background.

Support for Dual Core: Inspect Code should run in the background

Suport for Dual Core: Analyze Dependencies, Analyze Cyclic Dependencies, Analyze Backward Dependencies, Analyze Module Dependenciese should run in the background

IDEA should support launching multiple search and/or analysis tasks in the background.

Comment actions Permalink

New Jira #s,

Find in Path doesn't display the scope in the title.


Please sign in to leave a comment.