eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
32 stars 79 forks source link

Find/Replace does not work #1488

Closed TT1x1 closed 1 week ago

TT1x1 commented 1 week ago

Find/Replace does not replace the found string correctly. With the sample code such as:

public class Test {

    public void a(int x) throws MyException {

    }

    public void b(int y, int b) throws MyException {

    }   
}

Do as follows:

1) Try to find "MyException" in code (Direction: forward, Scope: all, Options: wrap search) 2) When the first matching "MyException" word is found/highlighted, click "Replace/Find" or "Replace" to replace with "SomeOtherException" 3) IDE skips the highlighted word and replaces the second "MyException" word with "SomeOtherException", which is not correct

This problem appears at least in:

iloveeclipse commented 1 week ago

Can't reproduce on master following steps given. More info needed how to reproduce.

iloveeclipse commented 1 week ago

Note: this is most likely not related to JDT UI at all (as find/replace is a Platfrom UI contributed feature), if you can reproduce, please create bug at https://github.com/eclipse-platform/eclipse.platform.ui.