Package ghidra.framework.plugintool

# Class PluginEvent

java.lang.Object
ghidra.framework.plugintool.PluginEvent

Direct Known Subclasses:
  `CloseProgramPluginEvent`, `ExternalProgramLocationPluginEvent`, `ExternalProgramSelectionPluginEvent`, `ExternalReferencePluginEvent`, `FirstTimeAnalyzedPluginEvent`, `OpenProgramPluginEvent`, `ProgramActivatedPluginEvent`, `ProgramClosedPluginEvent`, `ProgramHighlightPluginEvent`, `ProgramLocationPluginEvent`, `ProgramOpenedPluginEvent`, `ProgramPostActivatedPluginEvent`, `ProgramSelectionPluginEvent`, `ProgramVisibilityChangePluginEvent`, `ProjectPluginEvent`, `TreeSelectionPluginEvent`, `ViewChangedPluginEvent`

public abstract class PluginEvent extends Object
Event generated by a plugin.

A PluginEvent should be annotate with a `ToolEventName` if it may be passed between multiple tools via a `ToolConnection`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `EXTERNAL_SOURCE_NAME`
  Name of event source when plugin event is passed to another tool as cross-tool event.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `PluginEvent(String sourceName, String eventName)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected String`
  `getDetails()`
  `final String`
  `getEventName()`
  Get the plugin event name.
  `final String`
  `getSourceName()`
  Returns the name of the plugin immediately responsible for firing this event.
  `final String`
  `getToolEventName()`
  Get the optional cross-tool event name which has been established via a `ToolEventName` annotation which makes it available for passing as an external tool via a `ToolConnection`.
  `PluginEvent`
  `getTriggerEvent()`
  `boolean`
  `isToolEvent()`
  Determine if this event has been annotated with a `ToolEventName` which makes it available for passing to another tool via a `ToolConnection`.
  `static String`
  `lookupToolEventName(Class<?> pluginEventClass)`
  Returns the tool event name corresponding to the given pluginEventClass.
  `void`
  `setSourceName(String s)`
  `void`
  `setTriggerEvent(PluginEvent triggerEvent)`
  `String`
  `toString()`

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

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

- ## Field Details

  - ### EXTERNAL_SOURCE_NAME

    public static final String EXTERNAL_SOURCE_NAME
    Name of event source when plugin event is passed to another tool as cross-tool event.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PluginEvent

    protected PluginEvent(String sourceName, String eventName)
    Constructor
    Parameters:
      `sourceName` - source name of the event
      `eventName` - name of event

- ## Method Details

  - ### lookupToolEventName

    public static String lookupToolEventName(Class<?> pluginEventClass)
    Returns the tool event name corresponding to the given pluginEventClass. If no corresponding tool event exists, null will be returned.

  - ### isToolEvent

    public boolean isToolEvent()
    Determine if this event has been annotated with a `ToolEventName` which makes it available for passing to another tool via a `ToolConnection`.
    Returns:
      true if event can be utilized as a cross-tool event

  - ### getToolEventName

    public final String getToolEventName()
    Get the optional cross-tool event name which has been established via a `ToolEventName` annotation which makes it available for passing as an external tool via a `ToolConnection`. This name may differ from the `getEventName()`.s
    Returns:
      tool event name or null if not permitted as a cross-tool event

  - ### getEventName

    public final String getEventName()
    Get the plugin event name.

  - ### getSourceName

    public final String getSourceName()
    Returns the name of the plugin immediately responsible for firing this event.

  - ### setSourceName

    public void setSourceName(String s)

  - ### setTriggerEvent

    public void setTriggerEvent(PluginEvent triggerEvent)

  - ### getTriggerEvent

    public PluginEvent getTriggerEvent()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getDetails

    protected String getDetails()