Package ghidra.framework.data

# Class ToolState

java.lang.Object
ghidra.framework.data.ToolState

Direct Known Subclasses:
  `GhidraToolState`

public class ToolState extends Object
Container object for the state of the tool to hold an XML element.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected PluginTool`
  `tool`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ToolState(PluginTool tool, DomainObject domainObject)`
  Construct a new tool state.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `getAfterState(DomainObject domainObject)`
  `void`
  `restoreAfterRedo(DomainObject domainObject)`
  Restore the tool's state after an undo
  `void`
  `restoreAfterUndo(DomainObject domainObject)`
  Restore the tool's state after an undo

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

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

- ## Field Details

  - ### tool

    protected PluginTool tool

- ## Constructor Details

  - ### ToolState

    public ToolState(PluginTool tool, DomainObject domainObject)
    Construct a new tool state.
    Parameters:
      `tool` - tool's state to save
      `domainObject` - the object containing the tool state

- ## Method Details

  - ### restoreAfterUndo

    public void restoreAfterUndo(DomainObject domainObject)
    Restore the tool's state after an undo

  - ### restoreAfterRedo

    public void restoreAfterRedo(DomainObject domainObject)
    Restore the tool's state after an undo

  - ### getAfterState

    public void getAfterState(DomainObject domainObject)