mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-1765 - Fixed sometimes incorrect Find Dialog result highlighting
This commit is contained in:
parent
026fad27ab
commit
68b7f88063
7 changed files with 534 additions and 188 deletions
|
@ -136,6 +136,14 @@ public class FindDialog extends DialogComponentProvider {
|
|||
textField.setText("");
|
||||
}
|
||||
|
||||
public void next() {
|
||||
doSearch(true);
|
||||
}
|
||||
|
||||
public void previous() {
|
||||
doSearch(false);
|
||||
}
|
||||
|
||||
private void doSearch(boolean forward) {
|
||||
|
||||
if (!nextButton.isEnabled()) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.util.List;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import generic.test.AbstractGenericTest;
|
||||
import ghidra.util.Swing;
|
||||
|
||||
public class FindDialogTest {
|
||||
|
||||
|
@ -32,8 +32,8 @@ public class FindDialogTest {
|
|||
findDialog.setHistory(List.of("search1"));
|
||||
|
||||
String searchText = "search"; // a prefix of an existing history entry
|
||||
findDialog.setSearchText(searchText);
|
||||
assertEquals(searchText, AbstractGenericTest.runSwing(() -> findDialog.getSearchText()));
|
||||
Swing.runNow(() -> findDialog.setSearchText(searchText));
|
||||
assertEquals(searchText, Swing.runNow(() -> findDialog.getSearchText()));
|
||||
}
|
||||
|
||||
private class DummySearcher implements FindDialogSearcher {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue