public abstract class CreateFromTemplateActionBase extends AnAction
AnAction.TransparentUpdate
ACTIONS_KEY, EMPTY_ARRAY
Constructor and Description |
---|
CreateFromTemplateActionBase(java.lang.String title,
java.lang.String description,
javax.swing.Icon icon) |
CreateFromTemplateActionBase(java.util.function.Supplier<java.lang.String> dynamicTitle,
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 void |
elementCreated(CreateFromTemplateDialog dialog,
PsiElement createdElement) |
protected AttributesDefaults |
getAttributesDefaults(DataContext dataContext) |
protected java.util.Map<java.lang.String,java.lang.String> |
getLiveTemplateDefaults(DataContext dataContext,
PsiFile file) |
protected AnAction |
getReplacedAction(FileTemplate selectedTemplate) |
protected PsiDirectory |
getTargetDirectory(DataContext dataContext,
IdeView view) |
protected abstract FileTemplate |
getTemplate(Project project,
PsiDirectory dir) |
static void |
startLiveTemplate(PsiFile file) |
static void |
startLiveTemplate(PsiFile file,
java.util.Map<java.lang.String,java.lang.String> defaultValues) |
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 CreateFromTemplateActionBase(java.lang.String title, java.lang.String description, javax.swing.Icon icon)
public CreateFromTemplateActionBase(java.util.function.Supplier<java.lang.String> dynamicTitle, java.util.function.Supplier<java.lang.String> dynamicDescription, javax.swing.Icon icon)
public final void actionPerformed(AnActionEvent e)
AnAction
actionPerformed
in class AnAction
e
- Carries information on the invocation placepublic static void startLiveTemplate(PsiFile file)
public static void startLiveTemplate(PsiFile file, java.util.Map<java.lang.String,java.lang.String> defaultValues)
protected PsiDirectory getTargetDirectory(DataContext dataContext, IdeView view)
protected abstract FileTemplate getTemplate(Project project, PsiDirectory dir)
protected AnAction getReplacedAction(FileTemplate selectedTemplate)
protected AttributesDefaults getAttributesDefaults(DataContext dataContext)
protected void elementCreated(CreateFromTemplateDialog dialog, PsiElement createdElement)
protected java.util.Map<java.lang.String,java.lang.String> getLiveTemplateDefaults(DataContext dataContext, PsiFile file)