public class FileTemplateUtil
extends java.lang.Object
Constructor and Description |
---|
FileTemplateUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
calculateAttributes(java.lang.String templateContent,
java.util.Map<java.lang.String,java.lang.Object> properties,
boolean includeDummies,
Project project) |
static java.lang.String [] |
calculateAttributes(java.lang.String templateContent,
java.util.Properties properties,
boolean includeDummies,
Project project) |
static boolean |
canCreateFromTemplate(PsiDirectory [] dirs,
FileTemplate template) |
static PsiElement |
createFromTemplate(FileTemplate template,
java.lang.String fileName,
java.util.Map<java.lang.String,java.lang.Object> propsMap,
PsiDirectory directory,
java.lang.ClassLoader classLoader) |
static PsiElement |
createFromTemplate(FileTemplate template,
java.lang.String fileName,
java.util.Properties props,
PsiDirectory directory) |
static PsiElement |
createFromTemplate(FileTemplate template,
java.lang.String fileName,
java.util.Properties props,
PsiDirectory directory,
java.lang.ClassLoader classLoader) |
static FileTemplate |
createTemplate(java.lang.String prefName,
java.lang.String extension,
java.lang.String content,
FileTemplate [] templates) |
static void |
fillDefaultProperties(java.util.Properties props,
PsiDirectory directory) |
static CreateFromTemplateHandler |
findHandler(FileTemplate template) |
protected static FileType |
getFileType(FileTemplate template) |
static javax.swing.Icon |
getIcon(FileTemplate fileTemplate) |
static java.util.regex.Pattern |
getTemplatePattern(FileTemplate template,
Project project,
<any> offsetToProperty) |
static java.lang.String |
indent(java.lang.String methodText,
Project project,
FileType fileType) |
static java.lang.String |
mergeTemplate(java.util.Map attributes,
java.lang.String content,
boolean useSystemLineSeparators) |
static java.lang.String |
mergeTemplate(java.util.Properties attributes,
java.lang.String content,
boolean useSystemLineSeparators) |
static java.lang.String |
mergeTemplate(java.util.Properties attributes,
java.lang.String content,
boolean useSystemLineSeparators,
Consumer<? super VelocityException> exceptionHandler) |
static void |
putAll(java.util.Map<java.lang.String,java.lang.Object> props,
java.util.Properties p) |
public static java.lang.String [] calculateAttributes(java.lang.String templateContent, java.util.Properties properties, boolean includeDummies, Project project) throws ParseException
ParseException
public static java.lang.String[] calculateAttributes(java.lang.String templateContent, java.util.Map<java.lang.String,java.lang.Object> properties, boolean includeDummies, Project project) throws ParseException
ParseException
public static java.lang.String mergeTemplate(java.util.Map attributes, java.lang.String content, boolean useSystemLineSeparators) throws java.io.IOException
java.io.IOException
public static java.lang.String mergeTemplate(java.util.Properties attributes, java.lang.String content, boolean useSystemLineSeparators) throws java.io.IOException
java.io.IOException
public static java.lang.String mergeTemplate(java.util.Properties attributes, java.lang.String content, boolean useSystemLineSeparators, Consumer<? super VelocityException> exceptionHandler)
public static PsiElement createFromTemplate(FileTemplate template, java.lang.String fileName, java.util.Properties props, PsiDirectory directory) throws java.lang.Exception
java.lang.Exception
public static PsiElement createFromTemplate(FileTemplate template, java.lang.String fileName, java.util.Properties props, PsiDirectory directory, java.lang.ClassLoader classLoader) throws java.lang.Exception
java.lang.Exception
public static PsiElement createFromTemplate(FileTemplate template, java.lang.String fileName, java.util.Map<java.lang.String,java.lang.Object> propsMap, PsiDirectory directory, java.lang.ClassLoader classLoader) throws java.lang.Exception
java.lang.Exception
public static CreateFromTemplateHandler findHandler(FileTemplate template)
public static void fillDefaultProperties(java.util.Properties props, PsiDirectory directory)
public static java.lang.String indent(java.lang.String methodText, Project project, FileType fileType)
public static boolean canCreateFromTemplate(PsiDirectory [] dirs, FileTemplate template)
protected static FileType getFileType(FileTemplate template)
public static javax.swing.Icon getIcon(FileTemplate fileTemplate)
public static void putAll(java.util.Map<java.lang.String,java.lang.Object> props, java.util.Properties p)
public static FileTemplate createTemplate(java.lang.String prefName, java.lang.String extension, java.lang.String content, FileTemplate [] templates)
public static java.util.regex.Pattern getTemplatePattern(FileTemplate template, Project project, <any> offsetToProperty)