Package ghidra.framework.plugintool
Class PluginEvent
java.lang.Object
ghidra.framework.plugintool.PluginEvent
- Direct Known Subclasses:
AbstractHighlightPluginEvent,AbstractLocationPluginEvent,AbstractSelectionPluginEvent,CloseProgramPluginEvent,ExternalProgramLocationPluginEvent,ExternalProgramSelectionPluginEvent,ExternalReferencePluginEvent,FirstTimeAnalyzedPluginEvent,OpenProgramPluginEvent,ProgramActivatedPluginEvent,ProgramClosedPluginEvent,ProgramOpenedPluginEvent,ProgramPostActivatedPluginEvent,ProgramVisibilityChangePluginEvent,ProjectPluginEvent,TreeSelectionPluginEvent,ViewChangedPluginEvent
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
FieldsModifier and TypeFieldDescriptionstatic final StringName of event source when plugin event is passed to another tool as cross-tool event. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPluginEvent(String sourceName, String eventName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringfinal StringGet the plugin event name.final StringReturns the name of the plugin immediately responsible for firing this event.final StringGet the optional cross-tool event name which has been established via aToolEventNameannotation which makes it available for passing as an external tool via aToolConnection.booleanDetermine if this event has been annotated with aToolEventNamewhich makes it available for passing to another tool via aToolConnection.static StringlookupToolEventName(Class<?> pluginEventClass) Returns the tool event name corresponding to the given pluginEventClass.voidvoidsetTriggerEvent(PluginEvent triggerEvent) toString()
-
Field Details
-
EXTERNAL_SOURCE_NAME
Name of event source when plugin event is passed to another tool as cross-tool event.- See Also:
-
-
Constructor Details
-
PluginEvent
Constructor- Parameters:
sourceName- source name of the eventeventName- name of event
-
-
Method Details
-
lookupToolEventName
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 aToolEventNamewhich makes it available for passing to another tool via aToolConnection.- Returns:
- true if event can be utilized as a cross-tool event
-
getToolEventName
Get the optional cross-tool event name which has been established via aToolEventNameannotation 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
Get the plugin event name. -
getSourceName
Returns the name of the plugin immediately responsible for firing this event. -
setSourceName
-
setTriggerEvent
-
getTriggerEvent
-
toString
-
getDetails
-