Package ghidra.app.cmd.module
Class AbstractModularizationCmd
- java.lang.Object
-
- ghidra.framework.cmd.BackgroundCommand
-
- ghidra.app.cmd.module.AbstractModularizationCmd
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
ComplexityDepthModularizationCmd
,DominanceModularizationCmd
public abstract class AbstractModularizationCmd extends BackgroundCommand
-
-
Field Summary
Fields Modifier and Type Field Description protected ProgramModule
destinationModule
protected TaskMonitor
monitor
protected Program
program
-
Constructor Summary
Constructors Constructor Description AbstractModularizationCmd(java.lang.String name, GroupPath path, java.lang.String treeName, ProgramSelection selection, CodeBlockModel blockModel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
applyModel()
boolean
applyTo(DomainObject obj, TaskMonitor taskMonitor)
Method called when this command is to apply changes to the given domain object.protected void
cleanEmpty()
protected GDirectedGraph<CodeBlockVertex,CodeBlockEdge>
createCallGraph()
protected ProgramFragment
createFragment(ProgramModule root, CodeBlock block)
protected ProgramModule
createModule(ProgramModule parent, java.lang.String moduleName)
protected void
makeFragment(Program p, ProgramModule module, CodeBlockVertex vertex)
-
Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, taskCompleted, toString
-
-
-
-
Field Detail
-
program
protected Program program
-
destinationModule
protected ProgramModule destinationModule
-
monitor
protected TaskMonitor monitor
-
-
Constructor Detail
-
AbstractModularizationCmd
public AbstractModularizationCmd(java.lang.String name, GroupPath path, java.lang.String treeName, ProgramSelection selection, CodeBlockModel blockModel)
-
-
Method Detail
-
applyModel
protected abstract void applyModel() throws CancelledException
- Throws:
CancelledException
-
applyTo
public boolean applyTo(DomainObject obj, TaskMonitor taskMonitor)
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 commandtaskMonitor
- monitor to show progress of the command- Returns:
- true if the command applied successfully
-
cleanEmpty
protected void cleanEmpty() throws NotEmptyException
- Throws:
NotEmptyException
-
createCallGraph
protected GDirectedGraph<CodeBlockVertex,CodeBlockEdge> createCallGraph() throws CancelledException
- Throws:
CancelledException
-
makeFragment
protected void makeFragment(Program p, ProgramModule module, CodeBlockVertex vertex)
-
createFragment
protected ProgramFragment createFragment(ProgramModule root, CodeBlock block)
-
createModule
protected ProgramModule createModule(ProgramModule parent, java.lang.String moduleName)
-
-