Interface DebuggerConsoleService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddResolutionAction(DockingActionIf action) Add an action which might be applied to an actionable log messageGet the action context for all actionable messagesvoidLog a message to the consolevoidlog(Icon icon, String message, ActionContext context) Log an actionable message to the consolevoidLog an error message to the consolevoidlog(Icon icon, String message, Throwable error, ActionContext context) Log an actionable error message to the consolebooleanlogContains(ActionContext context) Check if the console contains an actionable message for the given contextvoidremoveFromLog(ActionContext context) Remove an actionable message from the consolevoidRemove an action
-
Method Details
-
log
Log a message to the consoleWARNING: See
log(Icon, String, Throwable, ActionContext)regarding HTML.- Parameters:
icon- an icon for the messagemessage- the HTML-formatted message
-
log
Log an error message to the consoleWARNING: See
log(Icon, String, Throwable, ActionContext)regarding HTML.- Parameters:
icon- an icon for the messagemessage- the HTML-formatted messageerror- an exception, if applicable
-
log
Log an actionable message to the consoleWARNING: See
log(Icon, String, Throwable, ActionContext)regarding HTML.- Parameters:
icon- an icon for the messagemessage- the HTML-formatted messagecontext- an (immutable) context for actions
-
log
Log an actionable error message to the consoleWARNING: The log accepts and will interpret HTML in its messages, allowing a rich and flexible display; however, you MUST sanitize any content derived from the user or target. We recommend using
HTMLUtilities.escapeHTML(String).- Parameters:
icon- an icon for the messagemessage- the HTML-formatted messageerror- an exception, if applicablecontext- an (immutable) context for actions
-
removeFromLog
Remove an actionable message from the consoleIt is common courtesy to remove the entry when the user has resolved the issue, whether via the presented actions, or some other means. The framework does not do this automatically, because simply activating an action does not imply the issue will be resolved.
- Parameters:
context- the context of the entry to remove
-
logContains
Check if the console contains an actionable message for the given context- Parameters:
context- the context to check for- Returns:
- true if present, false if absent
-
getActionContexts
List<ActionContext> getActionContexts()Get the action context for all actionable messages- Returns:
- a copy of the collection of contexts, in no particular order
-
addResolutionAction
Add an action which might be applied to an actionable log messagePlease invoke this method from the Swing thread. Only toolbar and pop-up menu placement is considered. Toolbar actions are placed as icon-only buttons in the "Actions" column for any log message where the action is applicable to the context given for that message. Pop-up actions are placed in the context menu when a single message is selected and the action is applicable to its given context. In most cases, the action should be presented both as a button and as a pop-up menu. Less commonly, an action may be presented only as a pop-up, likely because it is an uncommon resolution, or because you don't want the user to activated it accidentally. Rarely, if ever, should an action be a button, but not in the menu. The user may expect the menu to give more complete descriptions of actions presented as buttons.
IMPORTANT: Unlike other action managers, you are required to remove your actions upon plugin disposal.
- Parameters:
action- the action
-
removeResolutionAction
Remove an actionPlease invoke this method from the Swing thread.
- Parameters:
action- the action
-