Package ghidra.app.util.viewer.util

# Class CodeComparisonActionContext

java.lang.Object
docking.DefaultActionContext
ghidra.app.util.viewer.util.CodeComparisonActionContext

All Implemented Interfaces:
  `ActionContext`, `CodeComparisonPanelActionContext`

Direct Known Subclasses:
  `DualDecompilerActionContext`, `DualListingActionContext`

public abstract class CodeComparisonActionContext extends DefaultActionContext implements CodeComparisonPanelActionContext

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CodeComparisonActionContext(ComponentProvider provider)`
  Constructor with no source component and no context object
  `CodeComparisonActionContext(ComponentProvider provider, Object contextObject, Component sourceComponent)`
  Constructor with source component and context object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract Function`
  `getSourceFunction()`
  Returns the function that is the source of the info being applied.
  `abstract Function`
  `getTargetFunction()`
  Returns the function that is the target of the info being applied.

  ### Methods inherited from class docking.DefaultActionContext

  `getComponentProvider, getContextObject, getEventClickModifiers, getMouseEvent, getSourceComponent, getSourceObject, hasAnyEventClickModifiers, setContextObject, setEventClickModifiers, setMouseEvent, setSourceObject, toString`

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

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

  ### Methods inherited from interface ghidra.app.util.viewer.util.CodeComparisonPanelActionContext

  `getCodeComparisonPanel`

- ## Constructor Details

  - ### CodeComparisonActionContext

    public CodeComparisonActionContext(ComponentProvider provider)
    Constructor with no source component and no context object
    Parameters:
      `provider` - the ComponentProvider that generated this context.

  - ### CodeComparisonActionContext

    public CodeComparisonActionContext(ComponentProvider provider, Object contextObject, Component sourceComponent)
    Constructor with source component and context object
    Parameters:
      `provider` - the ComponentProvider that generated this context.
      `contextObject` - an optional contextObject that the ComponentProvider can provide; this can be anything that actions wish to later retrieve
      `sourceComponent` - an optional source object; this is intended to be the component that is the source of the context, usually the focused component

- ## Method Details

  - ### getSourceFunction

    public abstract Function getSourceFunction()
    Returns the function that is the source of the info being applied. This will be whichever side of the function diff window that isn't active.
    Returns:
      the function to get information from

  - ### getTargetFunction

    public abstract Function getTargetFunction()
    Returns the function that is the target of the info being applied. This will be whichever side of the function diff window that is active.
    Returns:
      the function to apply information to