mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Test fix
This commit is contained in:
parent
4d546d8be9
commit
d9b2861d0e
1 changed files with 10 additions and 7 deletions
|
@ -16,8 +16,9 @@
|
||||||
package docking.widgets;
|
package docking.widgets;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.*;
|
import java.util.Collection;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.TreeMap;
|
||||||
import java.util.regex.*;
|
import java.util.regex.*;
|
||||||
|
|
||||||
import javax.swing.JEditorPane;
|
import javax.swing.JEditorPane;
|
||||||
|
@ -66,6 +67,8 @@ public class TextComponentSearcher implements FindDialogSearcher {
|
||||||
|
|
||||||
public void setEditorPane(JEditorPane editorPane) {
|
public void setEditorPane(JEditorPane editorPane) {
|
||||||
if (this.editorPane != editorPane) {
|
if (this.editorPane != editorPane) {
|
||||||
|
Document document = editorPane.getDocument();
|
||||||
|
document.removeDocumentListener(documentListener);
|
||||||
markResultsStale();
|
markResultsStale();
|
||||||
}
|
}
|
||||||
this.editorPane = editorPane;
|
this.editorPane = editorPane;
|
||||||
|
@ -79,11 +82,13 @@ public class TextComponentSearcher implements FindDialogSearcher {
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
caretUpdater.dispose();
|
caretUpdater.dispose();
|
||||||
|
|
||||||
|
if (editorPane != null) {
|
||||||
Document document = editorPane.getDocument();
|
Document document = editorPane.getDocument();
|
||||||
document.removeDocumentListener(documentListener);
|
document.removeDocumentListener(documentListener);
|
||||||
|
|
||||||
clearHighlights();
|
clearHighlights();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearHighlights() {
|
public void clearHighlights() {
|
||||||
|
@ -253,9 +258,7 @@ public class TextComponentSearcher implements FindDialogSearcher {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator<FindMatch> it = matchesByPosition.values().iterator();
|
for (FindMatch match : matchesByPosition.values()) {
|
||||||
while (it.hasNext()) {
|
|
||||||
FindMatch match = it.next();
|
|
||||||
boolean isActive = false;
|
boolean isActive = false;
|
||||||
if (match.contains(pos)) {
|
if (match.contains(pos)) {
|
||||||
activeMatch = match;
|
activeMatch = match;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue