Package ghidra.app.cmd.function
Class CreateMultipleFunctionsCmd
- java.lang.Object
-
- ghidra.framework.cmd.BackgroundCommand
-
- ghidra.app.cmd.function.CreateMultipleFunctionsCmd
-
- All Implemented Interfaces:
Command
public class CreateMultipleFunctionsCmd extends BackgroundCommand
Command for Creating multiple functions from a selection. This tries to create functions by working from the minimum address to the maximum address in the selection. Any addresses in the selection that are already in existing functions are discarded. Every time a function is created, all the other addresses for that function are also discarded.
-
-
Constructor Summary
Constructors Constructor Description CreateMultipleFunctionsCmd(AddressSetView selection, SourceType source)
-
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.Function
createFunction(Address entryPoint, Program currentProgram, TaskMonitor monitor)
Creates a function at entry point in the specified program.-
Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, taskCompleted, toString
-
-
-
-
Constructor Detail
-
CreateMultipleFunctionsCmd
public CreateMultipleFunctionsCmd(AddressSetView selection, SourceType source)
-
-
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
-
createFunction
public final Function createFunction(Address entryPoint, Program currentProgram, TaskMonitor monitor)
Creates a function at entry point in the specified program.- Parameters:
entryPoint
- the entry point of the functioncurrentProgram
- the program where the function should be createdmonitor
- the task monitor that allows the user to cancel- Returns:
- the new function or null if the function was not created
-
-