Package ghidra.framework.plugintool
Class PluginEvent
- java.lang.Object
-
- ghidra.framework.plugintool.PluginEvent
-
- Direct Known Subclasses:
CloseProgramPluginEvent
,DualProgramLocationPluginEvent
,ExternalProgramLocationPluginEvent
,ExternalProgramSelectionPluginEvent
,ExternalReferencePluginEvent
,OpenProgramPluginEvent
,ProgramActivatedPluginEvent
,ProgramClosedPluginEvent
,ProgramHighlightPluginEvent
,ProgramLocationPluginEvent
,ProgramOpenedPluginEvent
,ProgramSelectionPluginEvent
,ProgramVisibilityChangePluginEvent
,TreeSelectionPluginEvent
,ViewChangedPluginEvent
public abstract class PluginEvent extends java.lang.Object
Event generated by a plugin.A PluginEvent should be annotate with a
ToolEventName
if it may be passed between multiple tools via aToolConnection
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.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(java.lang.String sourceName, java.lang.String eventName)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getDetails()
java.lang.String
getEventName()
Get the plugin event name.java.lang.String
getSourceName()
Returns the name of the plugin immediately responsible for firing this event.java.lang.String
getToolEventName()
Get the optional cross-tool event name which has been established via aToolEventName
annotation which makes it available for passing as an external tool via aToolConnection
.PluginEvent
getTriggerEvent()
boolean
isToolEvent()
Determine if this event has been annotated with aToolEventName
which makes it available for passing to another tool via aToolConnection
.static java.lang.String
lookupToolEventName(java.lang.Class<?> pluginEventClass)
Returns the tool event name corresponding to the given pluginEventClass.void
setSourceName(java.lang.String s)
void
setTriggerEvent(PluginEvent triggerEvent)
java.lang.String
toString()
-
-
-
Field Detail
-
EXTERNAL_SOURCE_NAME
public static final java.lang.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
-
-
Method Detail
-
lookupToolEventName
public static java.lang.String lookupToolEventName(java.lang.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 aToolEventName
which makes it available for passing to another tool via aToolConnection
.- Returns:
- true if event can be utilized as a cross-tool event
-
getToolEventName
public final java.lang.String getToolEventName()
Get the optional cross-tool event name which has been established via aToolEventName
annotation which makes it available for passing as an external tool via aToolConnection
. This name may differ from thegetEventName()
.s- Returns:
- tool event name or null if not permitted as a cross-tool event
-
getEventName
public final java.lang.String getEventName()
Get the plugin event name.
-
getSourceName
public final java.lang.String getSourceName()
Returns the name of the plugin immediately responsible for firing this event.
-
setSourceName
public void setSourceName(java.lang.String s)
-
setTriggerEvent
public void setTriggerEvent(PluginEvent triggerEvent)
-
getTriggerEvent
public PluginEvent getTriggerEvent()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDetails
protected java.lang.String getDetails()
-
-