public abstract class BaseRunConfigurationAction extends ActionGroup
AnAction.TransparentUpdate
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG |
EMPTY_GROUP
ACTIONS_KEY, EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
BaseRunConfigurationAction(java.util.function.Supplier<java.lang.String> text,
java.util.function.Supplier<java.lang.String> description,
javax.swing.Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(AnActionEvent e)
This method can be called in popup menus if
ActionGroup.canBePerformed(DataContext) is true . |
protected void |
approximatePresentationByPreviousAvailability(AnActionEvent event,
ThreeState hadAnythingRunnable) |
void |
beforeActionPerformedUpdate(AnActionEvent e)
Same as
AnAction.update(AnActionEvent) but is calls immediately before actionPerformed() as final check guard. |
boolean |
canBePerformed(DataContext dataContext) |
protected java.util.List<AnAction> |
createChildActions(ConfigurationContext context,
java.util.List<? extends ConfigurationFromContext> configurations) |
protected void |
fullUpdate(AnActionEvent event) |
AnAction [] |
getChildren(AnActionEvent e)
Returns the children of the group.
|
boolean |
isDumbAware() |
protected boolean |
isEnabledFor(RunConfiguration configuration) |
protected abstract void |
perform(ConfigurationContext context) |
static java.lang.String |
suggestRunActionName(LocatableConfiguration configuration) |
void |
update(AnActionEvent event)
Updates the state of the action.
|
protected abstract void |
updatePresentation(Presentation presentation,
java.lang.String actionText,
ConfigurationContext context) |
addPropertyChangeListener, disableIfNoVisibleChildren, firePropertyChange, getChildren, hideIfNoVisibleChildren, isPopup, isPopup, isPrimary, removePropertyChangeListener, replace, setPopup
addTextOverride, applyTextOverride, copyFrom, copyShortcutFrom, displayTextInToolbar, getEventProject, getShortcutSet, getTemplatePresentation, getTemplateText, isDefaultIcon, isEnabledInModalContext, isInInjectedContext, isTransparentUpdate, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, setDefaultIcon, setEnabledInModalContext, setInjectedContext, setShortcutSet, startInTransaction, toString, unregisterCustomShortcutSet, useSmallerFontForTextInToolbar
protected static final Logger LOG
protected BaseRunConfigurationAction(java.util.function.Supplier<java.lang.String> text, java.util.function.Supplier<java.lang.String> description, javax.swing.Icon icon)
public AnAction [] getChildren(AnActionEvent e)
ActionGroup
getChildren
in class ActionGroup
null
.protected java.util.List<AnAction> createChildActions(ConfigurationContext context, java.util.List<? extends ConfigurationFromContext> configurations)
protected boolean isEnabledFor(RunConfiguration configuration)
public boolean canBePerformed(DataContext dataContext)
canBePerformed
in class ActionGroup
true
if ActionGroup.actionPerformed(AnActionEvent)
should be called.public void actionPerformed(AnActionEvent e)
ActionGroup
ActionGroup.canBePerformed(DataContext)
is true
.actionPerformed
in class ActionGroup
e
- Carries information on the invocation placeprotected abstract void perform(ConfigurationContext context)
public void beforeActionPerformedUpdate(AnActionEvent e)
AnAction
AnAction.update(AnActionEvent)
but is calls immediately before actionPerformed() as final check guard.
Default implementation delegates to AnAction.update(AnActionEvent)
.beforeActionPerformedUpdate
in class AnAction
e
- Carries information on the invocation place and data availablepublic void update(AnActionEvent event)
AnAction
AnAction.actionPerformed(AnActionEvent)
method and notify
the user that action cannot be executed if it's the case.
If the action is added to a toolbar, its "update" can be called twice a second, but only if there was
any user activity or a focus transfer. If your action's availability is changed
in absence of any of these events, please call ActivityTracker.getInstance().inc()
to notify
action subsystem to update all toolbar actions when your subsystem's determines that its actions' visibility might be affected.protected void approximatePresentationByPreviousAvailability(AnActionEvent event, ThreeState hadAnythingRunnable)
protected void fullUpdate(AnActionEvent event)
public boolean isDumbAware()
isDumbAware
in interface PossiblyDumbAware
isDumbAware
in class ActionGroup
public static java.lang.String suggestRunActionName(LocatableConfiguration configuration)
protected abstract void updatePresentation(Presentation presentation, java.lang.String actionText, ConfigurationContext context)