Edy Hinzen reports:
The function 'replace in path' works in a 'random order' for showing the 'replace usage'. That means, the discussion does
not start with the first occurance, but anywhere in the middle.
This is not only confusing the user. Even worse, the
[all in this file] button doesn't work correct because the changes
will be done from the current random position and therefore the discussion is shown several times for the same file.
Reproduction: Take any project and pretend changeing "e" to "e". Watch the occurences-window how processing randomizes.
As you may see in the screenshot, the replacement does
not start with the first file and
not with the
first occurance within that file.
Instead of that, the second occurance (line 14) is discussed. As a result, line 13 will be discussed again,
even pressing
[All in this file].
I assume the sequence is not "pure random" but is a result of storing the search results in a binary tree.
With 'first file', I mean the first file found
and listed in the window "Find - Occurences of '...'".
As I tried to show in my screenshot, the search/replace does
not start with that file (whatever it was), but starts with
file "metatags.jsp".
"Before" that file, there were more files and directories listed.
I don't care that the
files are discussed in random order (although confusing).
The real problem is that the
occurrences within the file are
not starting with the
first occurence, but with
any.
In my example, as said, line 14 had been discussed first.
When I now answer with
[All in this file], occurences are (obviously) changed starting from line 14 and not from line 1.
Because of this, line 13 remains unchanged. This results in that the procedure will ask me again later for the same file
and discuss about the forgotten line 13.
Assuming, we have 5 files with about 30 occurences at all, the user is
not asked 5 times (further assuming he always
clicks
[All in this file]), but is asked about 25 times.
IDEA-7216 may be related.