public class JavaCreateFromTemplateHandler extends java.lang.Object implements CreateFromTemplateHandler
EP_NAME
Constructor and Description |
---|
JavaCreateFromTemplateHandler() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canCreate(PsiDirectory dir) |
boolean |
canCreate(PsiDirectory [] dirs) |
java.lang.String |
commandName(FileTemplate template) |
static PsiClass |
createClassOrInterface(Project project,
PsiDirectory directory,
java.lang.String content,
boolean reformat,
java.lang.String extension) |
PsiElement |
createFromTemplate(Project project,
PsiDirectory directory,
java.lang.String fileName,
FileTemplate template,
java.lang.String templateText,
java.util.Map<java.lang.String,java.lang.Object> props) |
java.lang.String |
getErrorMessage() |
boolean |
handlesTemplate(FileTemplate template) |
boolean |
isNameRequired() |
void |
prepareProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepareProperties
public static PsiClass createClassOrInterface(Project project, PsiDirectory directory, java.lang.String content, boolean reformat, java.lang.String extension) throws IncorrectOperationException
IncorrectOperationException
public boolean handlesTemplate(FileTemplate template)
handlesTemplate
in interface CreateFromTemplateHandler
public PsiElement createFromTemplate(Project project, PsiDirectory directory, java.lang.String fileName, FileTemplate template, java.lang.String templateText, java.util.Map<java.lang.String,java.lang.Object> props) throws IncorrectOperationException
createFromTemplate
in interface CreateFromTemplateHandler
IncorrectOperationException
public boolean canCreate(PsiDirectory [] dirs)
canCreate
in interface CreateFromTemplateHandler
public boolean isNameRequired()
isNameRequired
in interface CreateFromTemplateHandler
public java.lang.String getErrorMessage()
getErrorMessage
in interface CreateFromTemplateHandler
public void prepareProperties(java.util.Map<java.lang.String,java.lang.Object> props)
prepareProperties
in interface CreateFromTemplateHandler
public java.lang.String commandName(FileTemplate template)
commandName
in interface CreateFromTemplateHandler
public static boolean canCreate(PsiDirectory dir)