Community
Participate
Working Groups
From EC post: "Bug Report - Find/Replace" on Oct. 9, 2001. I did a find/replace on "GUI_FONT" with "com.packagename.GUI_FONT" and got stuck in an infinite loop as it kept trying to replace the new GUI_FONT string over and over instead of moving on. NOTES:
The only case I found in which this happens is repeatedly using Replace/Find when having wrap search enabled. This, however, is the intended behavior. Asked for more detailed information on EC.
From EC: Ah haaa! The secret is to click on the class name in the Outline view and then do the find and replace (no boxes other boxes checked). I wasn't able to reproduce the error either for a little bit, but there you have it. Example code used (I click TestClass in the Outline area and did a find/replace on TABLE_MODEL with Constants.TABLE_MODEL): package testing; import java.util.*; public class TestClass { private final static String TABLE_MODEL = "table model"; public static void main(String args[]) { TestClass x = new TestClass(); x.doStuff(); } public void doStuff() { ArrayList temp = new ArrayList(); if ("tablemodel".equals(TABLE_MODEL)) return; for (int i = 0; i < 100; i++) temp.add(new Integer(i)); boolean didWeBreakHere = true; } }
Nick, Do you still have the e-mail of the person (EC?) who reported this bug? I can't reproduce it. Otherwise I will close this bug with 'works-for-me'.
EC stands for Eclipse Corner. The poster was Charles Hasegawa <CurveWrecker@home.com>
Since Kai came up with a reproducable case, did he perhaps already fix it?
Thanks to Charles, I can finally reproduce it: 1. Open a class in the editor. I have the editor set to show each method rather than the whole source. 2. In the Outline View, click on the class name (the import and package information should "disappear"). 3. Right-click anywhere in the editor window and select Find/Replace. 4. Enter the find and replace with strings. I do not change any of the options (default = none checked). The direction is by default = Forward. 5. Click the Replace All box and endless loop to your heart's content.
fixed in integration build > 20020115