Package ghidra.debug.api.target
Interface Target.ActionEntry
- Enclosing interface:
Target
public static interface Target.ActionEntry
A description of a UI action provided by this target.
In most cases, this will generate a menu entry or a toolbar button, but in some cases, it's just invoked implicitly. Often, the two suppliers are implemented using lambda functions, and those functions will keep whatever some means of querying UI and/or target context in their closures.
-
Method Summary
Modifier and TypeMethodDescriptiondetails()Get the text providing more details, usually displayed in a tool tipdisplay()Get the text to display on UI actions associated with this entrydefault Objectget(boolean prompt) Invoke the action synchronously, getting its resultdefault ActionName.ShowgetShow()Check if this action's name is built inicon()Get the icon to display in menus and dialogsdefault CompletableFuture<?> invokeAsync(boolean prompt) Invoke the action asynchronously, prompting if desiredinvokeAsyncWithoutTimeout(boolean prompt) Invoke the action asynchronously, prompting if desired.booleanCheck if this action is currently enabledname()Get the name of a common debugger command this action implementsbooleanCheck whether invoking the action requires further user interactiondefault voidrun(boolean prompt) Invoke the action synchronouslylongGet a relative score of specificity.
-
Method Details
-
display
String display()Get the text to display on UI actions associated with this entry- Returns:
- the display
-
name
ActionName name()Get the name of a common debugger command this action implements- Returns:
- the name
-
icon
Icon icon()Get the icon to display in menus and dialogs- Returns:
- the icon
-
details
String details()Get the text providing more details, usually displayed in a tool tip- Returns:
- the details
-
requiresPrompt
boolean requiresPrompt()Check whether invoking the action requires further user interaction- Returns:
- true if prompting is required
-
specificity
long specificity()Get a relative score of specificity.These are only meaningful when compared among entries returned in the same collection.
- Returns:
- the specificity
-
invokeAsyncWithoutTimeout
Invoke the action asynchronously, prompting if desired.The implementation is not required to provide a timeout; however, downstream components may.
- Parameters:
prompt- whether or not to prompt the user for arguments- Returns:
- the future result, often
Void
-
isEnabled
boolean isEnabled()Check if this action is currently enabled- Returns:
- true if enabled
-
invokeAsync
Invoke the action asynchronously, prompting if desiredNote this will impose a timeout of 10000L milliseconds.
- Parameters:
prompt- whether or not to prompt the user for arguments- Returns:
- the future result, often
Void
-
run
default void run(boolean prompt) Invoke the action synchronouslyTo avoid blocking the Swing thread on a remote socket, this method cannot be called on the Swing thread.
- Parameters:
prompt- whether or not to prompt the user for arguments
-
get
Invoke the action synchronously, getting its result- Parameters:
prompt- whether or not to prompt the user for arguments- Returns:
- the resulting value, if applicable
-
getShow
Check if this action's name is built in- Returns:
- true if built in.
-