Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-11-21-25'

This commit is contained in:
Ryan Kurtz
2025-11-24 12:32:31 -05:00
4 changed files with 6 additions and 9 deletions

View File

@@ -147,9 +147,10 @@ public class ConsolePluginTest extends AbstractGhidraHeadedIntegrationTest {
// highlighted correctly.
String newSearchText = "java";
runSwing(() -> findDialog.setSearchText(newSearchText));
pressButtonByText(findDialog, "Next");
next();
matches = getExpectedMatches();
assertEquals(2, matches.size());
verfiyHighlightColor(matches);
close(findDialog);

View File

@@ -139,10 +139,7 @@ public abstract class SearchResults {
}
/**
* Runs the given job, cancelling any currently running jobs. We assume that only one job
* should be run at a time for the given worker for all search results sharing that worker,
* not just a single search results. This keeps multiple search results from interfering with
* each other as the user interacts with the results.
* Schedules the given job to run. This does not cancel any other pending work.
* @param job the job
*/
protected void runJob(FindJob job) {
@@ -179,7 +176,6 @@ public abstract class SearchResults {
@Override
public final void run(TaskMonitor monitor) throws CancelledException {
monitor.checkCancelled();
if (runnable != null) {
@@ -254,7 +250,7 @@ public abstract class SearchResults {
public class SwingJob extends FindJob {
public SwingJob(Runnable r) {
this.runnable = m -> r.run();
this.runnable = m -> Swing.runNow(r);
}
}

View File

@@ -405,6 +405,7 @@ public class TextComponentSearchResults extends SearchResults {
maybeInstallHighlighter();
Collection<TextComponentSearchLocation> locations = matchesByPosition.values();
for (TextComponentSearchLocation location : locations) {
doHighlightLocation(location);
}
@@ -462,7 +463,6 @@ public class TextComponentSearchResults extends SearchResults {
@Override
public void dispose() {
deactivate();
caretUpdater.dispose();
if (editorPane != null) {

View File

@@ -212,7 +212,7 @@ public class TextComponentSearcher implements FindDialogSearcher {
private boolean useRegex;
SearchTask(String searchText, boolean useRegex) {
super("Help Search Task", true, false, true, true);
super("Text Find Task", true, false, true, true);
this.searchText = searchText;
this.useRegex = useRegex;
}