GP-3 - Updated Navigatable to have a notion of selected text; updated

the SearchTextPlugin to use this feature
This commit is contained in:
dragonmacher 2021-05-18 16:30:08 -04:00
parent 3cc2bc5b06
commit 15a78011e3
19 changed files with 162 additions and 40 deletions

View file

@ -15,6 +15,8 @@
*/
package ghidra.app.plugin.core.diff;
import javax.swing.Icon;
import ghidra.app.nav.*;
import ghidra.app.plugin.core.codebrowser.CodeViewerLocationMemento;
import ghidra.app.util.HighlightProvider;
@ -24,8 +26,6 @@ import ghidra.program.util.ProgramSelection;
import ghidra.util.datastruct.WeakDataStructureFactory;
import ghidra.util.datastruct.WeakSet;
import javax.swing.Icon;
/**
* This is a navigatable for use by the right-hand listing of the Diff.
* It should navigate within the Diff's listing, which would then reposition
@ -140,6 +140,11 @@ class DiffNavigatable implements Navigatable {
return navigatable.getHighlight();
}
@Override
public String getTextSelection() {
return navigatable.getTextSelection();
}
@Override
public void addNavigatableListener(NavigatableRemovalListener listener) {
navigationListeners.add(listener);