public abstract class CreateTemplateInPackageAction<T extends PsiElement> extends CreateFromTemplateAction<T>
AnAction.TransparentUpdate
LOG
ACTIONS_KEY, EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
CreateTemplateInPackageAction(java.lang.String text,
java.lang.String description,
javax.swing.Icon icon,
java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes) |
protected |
CreateTemplateInPackageAction(java.util.function.Supplier<java.lang.String> dynamicText,
java.util.function.Supplier<java.lang.String> dynamicDescription,
javax.swing.Icon icon,
java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
checkPackageExists(PsiDirectory directory) |
protected T |
createFile(java.lang.String name,
java.lang.String templateName,
PsiDirectory dir) |
protected abstract T |
doCreate(PsiDirectory dir,
java.lang.String className,
java.lang.String templateName) |
protected abstract PsiElement |
getNavigationElement(T createdElement) |
protected boolean |
isAvailable(DataContext dataContext) |
static boolean |
isAvailable(DataContext dataContext,
java.util.Set<? extends JpsModuleSourceRootType<?>> sourceRootTypes,
java.util.function.Predicate<? super PsiDirectory> checkPackageExists) |
protected java.lang.String |
removeExtension(java.lang.String templateName,
java.lang.String className) |
actionPerformed, buildDialog, getActionName, getDefaultTemplateName, getDefaultTemplateProperty, getErrorTitle, moveCaretAfterNameIdentifier, postProcess, 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
isDumbAware
protected CreateTemplateInPackageAction(java.lang.String text, java.lang.String description, javax.swing.Icon icon, java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
protected CreateTemplateInPackageAction(java.util.function.Supplier<java.lang.String> dynamicText, java.util.function.Supplier<java.lang.String> dynamicDescription, javax.swing.Icon icon, java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
protected T createFile(java.lang.String name, java.lang.String templateName, PsiDirectory dir)
createFile
in class CreateFromTemplateAction<T extends PsiElement>
protected abstract PsiElement getNavigationElement(T createdElement)
protected boolean isAvailable(DataContext dataContext)
isAvailable
in class CreateFromTemplateAction<T extends PsiElement>
public static boolean isAvailable(DataContext dataContext, java.util.Set<? extends JpsModuleSourceRootType<?>> sourceRootTypes, java.util.function.Predicate<? super PsiDirectory> checkPackageExists)
protected abstract boolean checkPackageExists(PsiDirectory directory)
protected java.lang.String removeExtension(java.lang.String templateName, java.lang.String className)
protected abstract T doCreate(PsiDirectory dir, java.lang.String className, java.lang.String templateName) throws IncorrectOperationException
IncorrectOperationException