History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-6291
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Maxim Shafirov
Reporter: Serge Baranov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Find in Path returns results in incorrect order and doesn't replace all occurences

Created: 07 Jun 06 18:30   Updated: 21 Jul 06 00:01
Component/s: Editor. Editing Text
Fix Version/s: Demetra 5557

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. IDEA random replace.png
(118 kb)
Environment: Also reproducible in IDEA 5.1.2 EAP and Demetra build 5321

Build: 4,192
Fixed in build: 5,555
Severity: High


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.