Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342932

Summary: replace does not replace all matches found in same file
Product: [Eclipse Project] Platform Reporter: Kentaroh Noji <kennoji>
Component: SearchAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: camle, daniel_megert, kitlo, markus.kell.r, pwebster
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screencapture none

Description Kentaroh Noji CLA 2011-04-15 04:49:24 EDT
Build Identifier: I20110407-2200

This bug was found and reported during DBCS enablement test, but this may be not DBCS problem.
Find/replace function can find all characters in the target resources, but fails to replace all characters. The replace function replaces first found character only. The replacement does not work recursively. 

This problem happens in Eclipse v3.7/v4.1, but does not happen in v3.6. 

JDK: java full version "JRE 1.6.0 IBM Windows AMD 64 build pwa6460sr9fp1-20110208_03(SR9 FP1)" 
OS: Windows 7 SP1


Reproducible: Always

Steps to Reproduce:
1.Create a general project
2.Add untitled text file in the project
3.Enter same characters in multiple lines in the text. 
4.Open search dialog, enter a character in the Containing text input field. 
5.Click "Replace" button
6.Enter a character in "With" input field. 
7.Click "Review" button. 
8 Replace Text Matches window shows that replacement works for the first matched line.
Comment 1 Kentaroh Noji CLA 2011-04-15 04:55:39 EDT
Created attachment 193333 [details]
Screencapture
Comment 2 Dani Megert CLA 2011-04-15 06:25:24 EDT
Caused by incomplete fix for bug 320533.

Fixed in HEAD (ReplaceRefactoring.java, rev. 1.9).
Available in builds >= N20110415-2000.
Comment 3 Kentaroh Noji CLA 2011-05-17 04:21:13 EDT
Verified the problem was fixed with v4.1 I20110501-0200 (M7), Win7 64Bit.