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 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:
  • 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()