Package ghidra.app.cmd.data
Class CreateDataInStructureBackgroundCmd
- java.lang.Object
-
- ghidra.framework.cmd.BackgroundCommand
-
- ghidra.app.cmd.data.CreateDataInStructureBackgroundCmd
-
- All Implemented Interfaces:
Command
public class CreateDataInStructureBackgroundCmd extends BackgroundCommand
Background command to create data across a selection inside of a structure.
-
-
Constructor Summary
Constructors Constructor Description CreateDataInStructureBackgroundCmd(Address addr, int[] startPath, int length, DataType dt)
Constructs a command for applying dataTypes within an existing structure across a range of components.CreateDataInStructureBackgroundCmd(Address addr, int[] startPath, int length, DataType dt, boolean stackPointers)
This is the same asCreateDataInStructureBackgroundCmd(Address, int[], int, DataType )
except that it allows the caller to control whether or not a pointer data type is created when a non-pointer data type is applied at a location that previously contained a pointer data type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applyTo(DomainObject obj, TaskMonitor monitor)
Method called when this command is to apply changes to the given domain object.-
Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, taskCompleted, toString
-
-
-
-
Constructor Detail
-
CreateDataInStructureBackgroundCmd
public CreateDataInStructureBackgroundCmd(Address addr, int[] startPath, int length, DataType dt)
Constructs a command for applying dataTypes within an existing structure across a range of components. Simple pointer conversion will NOT be performed.- Parameters:
addr
- The address of the existing structure.startPath
- the componentPath where to begin applying the datatype.length
- the number of bytes to apply the data type to.dt
- the datatype to be applied to the range of components.
-
CreateDataInStructureBackgroundCmd
public CreateDataInStructureBackgroundCmd(Address addr, int[] startPath, int length, DataType dt, boolean stackPointers)
This is the same asCreateDataInStructureBackgroundCmd(Address, int[], int, DataType )
except that it allows the caller to control whether or not a pointer data type is created when a non-pointer data type is applied at a location that previously contained a pointer data type.- Parameters:
addr
- The address of the existing structure.startPath
- the componentPath where to begin applying the datatype.length
- the number of bytes to apply the data type to.dt
- the datatype to be applied to the range of components.stackPointers
- True will convert the given data type to a pointer if it is not one and the previous type was a pointer; false will not make this conversion
-
-
Method Detail
-
applyTo
public boolean applyTo(DomainObject obj, TaskMonitor monitor)
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
- 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
- See Also:
BackgroundCommand.applyTo(ghidra.framework.model.DomainObject, ghidra.util.task.TaskMonitor)
-
-