Merge remote-tracking branch 'origin/Ghidra_11.0'

This commit is contained in:
Ryan Kurtz 2023-12-20 13:09:57 -05:00
commit 7864905bb6
14 changed files with 251 additions and 65 deletions

View file

@ -27,6 +27,7 @@ import org.junit.*;
import docking.DefaultActionContext;
import docking.action.ToggleDockingAction;
import docking.widgets.fieldpanel.support.FieldLocation;
import ghidra.app.events.OpenProgramPluginEvent;
import ghidra.app.plugin.core.format.*;
import ghidra.app.plugin.core.navigation.NavigationHistoryPlugin;
import ghidra.app.plugin.core.navigation.NextPrevAddressPlugin;
@ -70,6 +71,13 @@ public class ByteViewerConnectedToolBehaviorTest extends AbstractGhidraHeadedInt
env.connectTools(toolOne, tool2);
program = buildNotepad();
// open program in toolOne
env.open(program);
// open same program in second tool - cannot rely on tool connection for this
tool2.firePluginEvent(new OpenProgramPluginEvent("Test", program));
final ProgramManager pm = toolOne.getService(ProgramManager.class);
runSwing(() -> pm.openProgram(program.getDomainFile()));
}
@ -223,8 +231,8 @@ public class ByteViewerConnectedToolBehaviorTest extends AbstractGhidraHeadedInt
}
private Address convertToAddr(ByteViewerPlugin plugin, ByteBlockInfo info) {
return ((ProgramByteBlockSet) plugin.getProvider().getByteBlockSet()).getAddress(
info.getBlock(), info.getOffset());
return ((ProgramByteBlockSet) plugin.getProvider().getByteBlockSet())
.getAddress(info.getBlock(), info.getOffset());
}
private boolean byteBlockSelectionEquals(ByteBlockSelection b1, ByteBlockSelection b2) {