Package ghidra.framework.cmd
Class CompoundBackgroundCommand<T extends DomainObject>
java.lang.Object
ghidra.framework.cmd.BackgroundCommand<T>
ghidra.framework.cmd.CompoundBackgroundCommand<T>
- Type Parameters:
T
-DomainObject
implementation interface
- All Implemented Interfaces:
Command<T>
Compound command to handle multiple background commands.
-
Constructor Summary
ConstructorDescriptionCompoundBackgroundCommand
(String name, boolean modal, boolean canCancel) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a command to this compound background command.boolean
applyTo
(T obj, TaskMonitor monitor) Method called when this command is to apply changes to the given domain object.boolean
isEmpty()
int
size()
Get the number of background commands in this compound background command.Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, run, setStatusMsg, taskCompleted, toString
-
Constructor Details
-
CompoundBackgroundCommand
Constructor- Parameters:
name
- name of the commandmodal
- true means the monitor dialog is modal and the command has to complete or be canceled before any other action can occurcanCancel
- true means the command can be canceled
-
-
Method Details
-
applyTo
Description copied from class:BackgroundCommand
Method called when this command is to apply changes to the given domain object. A monitor is provided to display status information about the command as it executes in the background.- Specified by:
applyTo
in classBackgroundCommand<T extends DomainObject>
- Parameters:
obj
- domain object that will be affected by the commandmonitor
- monitor to show progress of the command- Returns:
- true if the command applied successfully
-
add
Add a command to this compound background command.- Parameters:
cmd
- command to be added
-
size
public int size()Get the number of background commands in this compound background command.- Returns:
- the number of commands
-
isEmpty
public boolean isEmpty()- Returns:
- true if no sub-commands have been added
-