Package ghidra.app.cmd.module

# Class SubroutineModelCmd

java.lang.Object
ghidra.framework.cmd.BackgroundCommand
ghidra.app.cmd.module.SubroutineModelCmd

All Implemented Interfaces:
  `Command`

public class SubroutineModelCmd extends BackgroundCommand
Command that organizes a Module or Fragment according to a specified block model. This organization produces a "flat" (single layer) partitioning.

See Also:
  - `CodeBlockModel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SubroutineModelCmd(GroupPath groupPath, String treeName, BlockModelService blockModelService, String modelName)`
  Constructor

- ## Method Summary

  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.
  `void`
  `setPluginTool(PluginTool tool)`

  ### Methods inherited from class ghidra.framework.cmd.BackgroundCommand

  `applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, taskCompleted, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SubroutineModelCmd

    public SubroutineModelCmd(GroupPath groupPath, String treeName, BlockModelService blockModelService, String modelName)
    Constructor
    Parameters:
      `groupPath` - group path of the affected Module or Fragment
      `treeName` - name of the tree where group exists
      `blockModelService` - service that has the known block models
      `modelName` - name of the model to use

- ## Method Details

  - ### 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 class `BackgroundCommand`
    Parameters:
      `obj` - domain object that will be affected by the command
      `monitor` - 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)`

  - ### setPluginTool

    public void setPluginTool(PluginTool tool)