public class CreateFileAction extends CreateElementActionBase implements DumbAware
Modifier and Type | Class and Description |
---|---|
static class |
CreateFileAction.MkDirs |
protected class |
CreateFileAction.MyValidator |
CreateElementActionBase.MyInputValidator
AnAction.TransparentUpdate
ACTIONS_KEY, EMPTY_ARRAY
Constructor and Description |
---|
CreateFileAction() |
CreateFileAction(java.lang.String text,
java.lang.String description,
javax.swing.Icon icon) |
CreateFileAction(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 |
---|---|
protected PsiElement [] |
create(java.lang.String newName,
PsiDirectory directory) |
static PsiDirectory |
findOrCreateSubdirectory(PsiDirectory parent,
java.lang.String subdirName) |
protected java.lang.String |
getActionName(PsiDirectory directory,
java.lang.String newName) |
protected java.lang.String |
getDefaultExtension() |
protected java.lang.String |
getErrorTitle() |
protected java.lang.String |
getFileName(java.lang.String newName) |
protected PsiElement [] |
invokeDialog(Project project,
PsiDirectory directory) |
protected void |
invokeDialog(Project project,
PsiDirectory directory,
java.util.function.Consumer<PsiElement[]> elementsConsumer)
Overloaded version of
CreateElementActionBase.invokeDialog(Project, PsiDirectory)
adapted for asynchronous calls |
boolean |
isDumbAware() |
actionPerformed, filterMessage, getCommandName, getIdeView
isAvailable, isAvailable, 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
public CreateFileAction()
public CreateFileAction(java.lang.String text, java.lang.String description, javax.swing.Icon icon)
public CreateFileAction(java.util.function.Supplier<java.lang.String> dynamicText, java.util.function.Supplier<java.lang.String> dynamicDescription, javax.swing.Icon icon)
public boolean isDumbAware()
isDumbAware
in interface PossiblyDumbAware
isDumbAware
in class CreateInDirectoryActionBase
protected PsiElement [] invokeDialog(Project project, PsiDirectory directory)
invokeDialog
in class CreateElementActionBase
protected void invokeDialog(Project project, PsiDirectory directory, java.util.function.Consumer<PsiElement[]> elementsConsumer)
CreateElementActionBase
CreateElementActionBase.invokeDialog(Project, PsiDirectory)
adapted for asynchronous callsinvokeDialog
in class CreateElementActionBase
elementsConsumer
- describes actions with created elementsprotected PsiElement [] create(java.lang.String newName, PsiDirectory directory) throws java.lang.Exception
create
in class CreateElementActionBase
java.lang.Exception
public static PsiDirectory findOrCreateSubdirectory(PsiDirectory parent, java.lang.String subdirName)
protected java.lang.String getActionName(PsiDirectory directory, java.lang.String newName)
getActionName
in class CreateElementActionBase
protected java.lang.String getErrorTitle()
getErrorTitle
in class CreateElementActionBase
protected java.lang.String getFileName(java.lang.String newName)
protected java.lang.String getDefaultExtension()