public abstract class CreateElementActionBase extends CreateInDirectoryActionBase implements WriteActionAware
Modifier and Type | Class and Description |
---|---|
protected class |
CreateElementActionBase.MyInputValidator |
AnAction.TransparentUpdate
ACTIONS_KEY, EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
CreateElementActionBase() |
protected |
CreateElementActionBase(java.lang.String text,
java.lang.String description,
javax.swing.Icon icon) |
protected |
CreateElementActionBase(java.util.function.Supplier<java.lang.String> dynamicText,
java.util.function.Supplier<java.lang.String> dynamicDescription,
javax.swing.Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(AnActionEvent e)
Implement this method to provide your action handler.
|
protected abstract PsiElement [] |
create(java.lang.String newName,
PsiDirectory directory) |
static java.lang.String |
filterMessage(java.lang.String message) |
protected abstract java.lang.String |
getActionName(PsiDirectory directory,
java.lang.String newName) |
protected java.lang.String |
getCommandName()
Deprecated.
this method isn't called by the platform;
getActionName(PsiDirectory, String) is used instead. |
protected abstract java.lang.String |
getErrorTitle() |
protected IdeView |
getIdeView(AnActionEvent e) |
protected PsiElement [] |
invokeDialog(Project project,
PsiDirectory directory)
Deprecated.
use async variant
invokeDialog(Project, PsiDirectory, Consumer) instead |
protected void |
invokeDialog(Project project,
PsiDirectory directory,
java.util.function.Consumer<PsiElement[]> elementsConsumer)
Overloaded version of
invokeDialog(Project, PsiDirectory)
adapted for asynchronous calls |
isAvailable, isAvailable, isDumbAware, update
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, useSmallerFontForTextInToolbar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
startInWriteAction
protected CreateElementActionBase()
protected CreateElementActionBase(java.lang.String text, java.lang.String description, javax.swing.Icon icon)
protected CreateElementActionBase(java.util.function.Supplier<java.lang.String> dynamicText, java.util.function.Supplier<java.lang.String> dynamicDescription, javax.swing.Icon icon)
@Deprecated protected PsiElement [] invokeDialog(Project project, PsiDirectory directory)
invokeDialog(Project, PsiDirectory, Consumer)
insteadprotected void invokeDialog(Project project, PsiDirectory directory, java.util.function.Consumer<PsiElement[]> elementsConsumer)
invokeDialog(Project, PsiDirectory)
adapted for asynchronous callselementsConsumer
- describes actions with created elementsprotected abstract PsiElement [] create(java.lang.String newName, PsiDirectory directory) throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.String getErrorTitle()
@Deprecated protected java.lang.String getCommandName()
getActionName(PsiDirectory, String)
is used instead.protected abstract java.lang.String getActionName(PsiDirectory directory, java.lang.String newName)
public final void actionPerformed(AnActionEvent e)
AnAction
actionPerformed
in class AnAction
e
- Carries information on the invocation placeprotected IdeView getIdeView(AnActionEvent e)
public static java.lang.String filterMessage(java.lang.String message)