public class CreateClassAction extends JavaCreateTemplateInPackageAction<PsiClass> implements DumbAware
AnAction.TransparentUpdate
LOG
ACTIONS_KEY, EMPTY_ARRAY
Constructor and Description |
---|
CreateClassAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildDialog(Project project,
PsiDirectory directory,
CreateFileFromTemplateDialog.Builder builder) |
protected PsiClass |
doCreate(PsiDirectory dir,
java.lang.String className,
java.lang.String templateName) |
protected java.lang.String |
getActionName(PsiDirectory directory,
java.lang.String newName,
java.lang.String templateName) |
protected java.lang.String |
getErrorTitle() |
protected PsiElement |
getNavigationElement(PsiClass createdElement) |
protected void |
postProcess(PsiClass createdElement,
java.lang.String templateName,
java.util.Map<java.lang.String,java.lang.String> customProperties) |
protected java.lang.String |
removeExtension(java.lang.String templateName,
java.lang.String className) |
boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
checkPackageExists, doCheckPackageExists
createFile, isAvailable, isAvailable
actionPerformed, getDefaultTemplateName, getDefaultTemplateProperty, moveCaretAfterNameIdentifier, 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
isDumbAware
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder)
buildDialog
in class CreateFromTemplateAction<PsiClass>
protected java.lang.String removeExtension(java.lang.String templateName, java.lang.String className)
removeExtension
in class CreateTemplateInPackageAction<PsiClass>
protected java.lang.String getErrorTitle()
getErrorTitle
in class CreateFromTemplateAction<PsiClass>
protected java.lang.String getActionName(PsiDirectory directory, java.lang.String newName, java.lang.String templateName)
getActionName
in class CreateFromTemplateAction<PsiClass>
public boolean startInWriteAction()
WriteActionAware
false
if e.g. modal dialog is shown inside the action.
If false
is returned the action itself is responsible for starting write action
when needed, by calling Application.runWriteAction(Runnable)
.startInWriteAction
in interface WriteActionAware
true
if the action requires a write action (default), false
otherwise.protected final PsiClass doCreate(PsiDirectory dir, java.lang.String className, java.lang.String templateName) throws IncorrectOperationException
doCreate
in class CreateTemplateInPackageAction<PsiClass>
IncorrectOperationException
protected PsiElement getNavigationElement(PsiClass createdElement)
getNavigationElement
in class CreateTemplateInPackageAction<PsiClass>
protected void postProcess(PsiClass createdElement, java.lang.String templateName, java.util.Map<java.lang.String,java.lang.String> customProperties)
postProcess
in class CreateFromTemplateAction<PsiClass>