GP-4390 Collapse DomainObject Undoable interfaces and refactor Command processing.

This commit is contained in:
ghidra1 2024-03-08 12:49:50 -05:00
parent 136b933af2
commit 445494ba25
214 changed files with 2862 additions and 3813 deletions

View file

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -17,33 +16,28 @@
package ghidra.app.plugin.core.diff;
import ghidra.framework.cmd.BackgroundCommand;
import ghidra.framework.model.DomainObject;
import ghidra.program.model.listing.Program;
import ghidra.util.task.TaskMonitor;
/**
* Command to apply diffs to current program.
*
*/
class NextDiffCommand extends BackgroundCommand {
class NextDiffCommand extends BackgroundCommand<Program> {
private ProgramDiffPlugin plugin;
/**
* Constructor.
* @param plugin
* @param currentLocation
* @param diffControl
*/
NextDiffCommand(ProgramDiffPlugin plugin) {
super("Next Difference", false, false, true);
this.plugin = plugin;
}
/**
* @see ghidra.framework.cmd.BackgroundCommand#applyTo(ghidra.framework.model.DomainObject, ghidra.util.task.TaskMonitor)
*/
@Override
public boolean applyTo(DomainObject obj, TaskMonitor monitor) {
public boolean applyTo(Program program, TaskMonitor monitor) {
monitor.setMessage("NextDiffTask starting...");
plugin.nextDiff();
return true;