public abstract class NotificationAction extends DumbAwareAction
Notification.addAction(AnAction)
AnAction.TransparentUpdate
ACTIONS_KEY, EMPTY_ARRAY
Constructor and Description |
---|
NotificationAction(java.lang.String text) |
NotificationAction(java.util.function.Supplier<java.lang.String> dynamicText) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(AnActionEvent e)
Implement this method to provide your action handler.
|
abstract void |
actionPerformed(AnActionEvent e,
Notification notification) |
static NotificationAction |
create(java.lang.String text,
java.util.function.BiConsumer<? super AnActionEvent,? super Notification> performAction) |
static NotificationAction |
create(java.util.function.Supplier<java.lang.String> dynamicText,
java.util.function.BiConsumer<? super AnActionEvent,? super Notification> performAction) |
static NotificationAction |
createSimple(java.lang.String text,
java.lang.Runnable performAction) |
static NotificationAction |
createSimple(java.util.function.Supplier<java.lang.String> dynamicText,
java.lang.Runnable performAction) |
static NotificationAction |
createSimpleExpiring(java.lang.String text,
java.lang.Runnable performAction) |
create, create
addTextOverride, applyTextOverride, beforeActionPerformedUpdate, copyFrom, copyShortcutFrom, displayTextInToolbar, getEventProject, getShortcutSet, getTemplatePresentation, getTemplateText, isDefaultIcon, isEnabledInModalContext, isInInjectedContext, isTransparentUpdate, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, setDefaultIcon, setEnabledInModalContext, setInjectedContext, setShortcutSet, startInTransaction, toString, unregisterCustomShortcutSet, update, useSmallerFontForTextInToolbar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isDumbAware
public NotificationAction(java.lang.String text)
public NotificationAction(java.util.function.Supplier<java.lang.String> dynamicText)
public void actionPerformed(AnActionEvent e)
AnAction
actionPerformed
in class AnAction
e
- Carries information on the invocation placepublic abstract void actionPerformed(AnActionEvent e, Notification notification)
public static NotificationAction create(java.lang.String text, java.util.function.BiConsumer<? super AnActionEvent,? super Notification> performAction)
public static NotificationAction create(java.util.function.Supplier<java.lang.String> dynamicText, java.util.function.BiConsumer<? super AnActionEvent,? super Notification> performAction)
public static NotificationAction createSimple(java.util.function.Supplier<java.lang.String> dynamicText, java.lang.Runnable performAction)
public static NotificationAction createSimple(java.lang.String text, java.lang.Runnable performAction)
public static NotificationAction createSimpleExpiring(java.lang.String text, java.lang.Runnable performAction)