Skip to content

FindReplaceDialog: indefinite listener generation and registration #2865

@HeikoKlare

Description

@HeikoKlare

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

Whenever changing the input of the find or replace input fields of a FindReplaceDialog, a new listener is registered. The more is typed in those fields, the more listeners will be registered:

Image

This is caused by registered a listener inside the text modification listener:

public void modifyText(ModifyEvent e) {
modificationHandler.run();
// XXX: Workaround for Combo bug on Linux (see bug 404202 and bug 410603)
if (fIgnoreNextEvent) {
fIgnoreNextEvent = false;
return;
}
modificationHandler.run();
fFindField.addModifyListener(event -> {
decorate();
});
updateButtonState(!findReplaceLogic.isActive(SearchOptions.INCREMENTAL));
}

Code has been introduced and thus this is a regression caused by:

@fedejeanne please have a look

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions