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 Change Modifier and Type Field Description NEW protected ProgramModuledestinationModuleNEW protected TaskMonitormonitorNEW protected Programprogram
-
Constructor Summary
Constructors Change 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 Change Modifier and Type Method Description NEW protected abstract voidapplyModel()booleanapplyTo(DomainObject obj, TaskMonitor taskMonitor)Method called when this command is to apply changes to the given domain object.NEW protected voidcleanEmpty()protected GDirectedGraph<CodeBlockVertex,CodeBlockEdge>createCallGraph()NEW protected ProgramFragmentcreateFragment(ProgramModule root, CodeBlock block)NEW protected ProgramModulecreateModule(ProgramModule parent, java.lang.String moduleName)NEW protected voidmakeFragment(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 NEW
protected Program program
-
destinationModule NEW
protected ProgramModule destinationModule
Constructor Detail
-
AbstractModularizationCmd
public AbstractModularizationCmd(java.lang.String name, GroupPath path, java.lang.String treeName, ProgramSelection selection, CodeBlockModel blockModel)
-
-
Method Detail
-
applyModel NEW
protected abstract void applyModel() throws CancelledException- Throws:
CancelledException
-
applyTo
public boolean applyTo(DomainObject obj, TaskMonitor taskMonitor)
Description copied from class:BackgroundCommandMethod 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:
applyToin 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 NEW
protected void cleanEmpty() throws NotEmptyException- Throws:
NotEmptyException
-
createCallGraph NEW
protected GDirectedGraph<CodeBlockVertex,CodeBlockEdge> createCallGraph() throws CancelledException
- Throws:
CancelledException
-
makeFragment NEW
protected void makeFragment(Program p, ProgramModule module, CodeBlockVertex vertex)
-
createFragment NEW
protected ProgramFragment createFragment(ProgramModule root, CodeBlock block)
-
createModule NEW
protected ProgramModule createModule(ProgramModule parent, java.lang.String moduleName)
-
-