public abstract class FileTemplateManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CODE_TEMPLATES_CATEGORY |
static Key<java.util.Properties> |
DEFAULT_TEMPLATE_PROPERTIES |
static java.lang.String |
DEFAULT_TEMPLATES_CATEGORY |
static java.lang.String |
FILE_HEADER_TEMPLATE_NAME |
static java.lang.String |
INCLUDES_TEMPLATES_CATEGORY |
static java.lang.String |
INTERNAL_HTML_TEMPLATE_NAME |
static java.lang.String |
INTERNAL_HTML5_TEMPLATE_NAME |
static java.lang.String |
INTERNAL_TEMPLATES_CATEGORY |
static java.lang.String |
INTERNAL_XHTML_TEMPLATE_NAME |
static java.lang.String |
J2EE_TEMPLATES_CATEGORY |
static java.lang.String |
PROJECT_NAME_VARIABLE |
static int |
RECENT_TEMPLATES_SIZE |
Constructor and Description |
---|
FileTemplateManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addRecentName(java.lang.String name) |
abstract FileTemplate |
addTemplate(java.lang.String name,
java.lang.String extension)
Creates a new template with specified name, and adds it to the list of default templates.
|
protected FileTemplateManager |
checkInitialized() |
abstract FileTemplate |
findInternalTemplate(java.lang.String templateName) |
abstract FileTemplate [] |
getAllCodeTemplates() |
abstract FileTemplate [] |
getAllJ2eeTemplates() |
abstract FileTemplate [] |
getAllPatterns() |
abstract FileTemplate [] |
getAllTemplates()
Returns all templates from "Default" category.
|
abstract FileTemplate |
getCodeTemplate(java.lang.String templateName) |
abstract FileTemplatesScheme |
getCurrentScheme() |
static FileTemplateManager |
getDefaultInstance() |
abstract java.util.Properties |
getDefaultProperties() |
java.util.Properties |
getDefaultProperties(Project project)
Deprecated.
use
getDefaultProperties() instead |
abstract FileTemplate |
getDefaultTemplate(java.lang.String name)
Returns template with default (bundled) text.
|
static FileTemplateManager |
getInstance()
Deprecated.
Use
getInstance(Project) instead |
static FileTemplateManager |
getInstance(Project project) |
abstract FileTemplate |
getInternalTemplate(java.lang.String templateName) |
abstract FileTemplate [] |
getInternalTemplates() |
abstract FileTemplate |
getJ2eeTemplate(java.lang.String templateName) |
abstract FileTemplate |
getPattern(java.lang.String name) |
abstract FileTemplatesScheme |
getProjectScheme() |
abstract java.util.Collection<java.lang.String> |
getRecentNames() |
abstract FileTemplate |
getTemplate(java.lang.String templateName) |
abstract FileTemplate [] |
getTemplates(java.lang.String category) |
abstract java.lang.String |
internalTemplateToSubject(java.lang.String templateName) |
abstract void |
removeTemplate(FileTemplate template) |
abstract void |
saveAllTemplates() |
abstract void |
setCurrentScheme(FileTemplatesScheme scheme) |
abstract void |
setTemplates(java.lang.String templatesCategory,
java.util.Collection<? extends FileTemplate> templates) |
public static final Key<java.util.Properties> DEFAULT_TEMPLATE_PROPERTIES
public static final int RECENT_TEMPLATES_SIZE
public static final java.lang.String INTERNAL_HTML_TEMPLATE_NAME
public static final java.lang.String INTERNAL_HTML5_TEMPLATE_NAME
public static final java.lang.String INTERNAL_XHTML_TEMPLATE_NAME
public static final java.lang.String FILE_HEADER_TEMPLATE_NAME
public static final java.lang.String DEFAULT_TEMPLATES_CATEGORY
public static final java.lang.String INTERNAL_TEMPLATES_CATEGORY
public static final java.lang.String INCLUDES_TEMPLATES_CATEGORY
public static final java.lang.String CODE_TEMPLATES_CATEGORY
public static final java.lang.String J2EE_TEMPLATES_CATEGORY
public static final java.lang.String PROJECT_NAME_VARIABLE
public static FileTemplateManager getInstance(Project project)
protected FileTemplateManager checkInitialized()
@Deprecated public static FileTemplateManager getInstance()
getInstance(Project)
insteadpublic static FileTemplateManager getDefaultInstance()
public abstract FileTemplatesScheme getCurrentScheme()
public abstract void setCurrentScheme(FileTemplatesScheme scheme)
public abstract FileTemplatesScheme getProjectScheme()
public abstract FileTemplate [] getTemplates(java.lang.String category)
public abstract FileTemplate [] getAllTemplates()
public abstract FileTemplate getTemplate(java.lang.String templateName)
public abstract java.util.Properties getDefaultProperties()
@Deprecated public java.util.Properties getDefaultProperties(Project project)
getDefaultProperties()
insteadpublic abstract FileTemplate addTemplate(java.lang.String name, java.lang.String extension)
public abstract void removeTemplate(FileTemplate template)
public abstract java.util.Collection<java.lang.String> getRecentNames()
public abstract void addRecentName(java.lang.String name)
public abstract FileTemplate getInternalTemplate(java.lang.String templateName)
public abstract FileTemplate findInternalTemplate(java.lang.String templateName)
public abstract FileTemplate [] getInternalTemplates()
public abstract FileTemplate getJ2eeTemplate(java.lang.String templateName)
templateName
- template namejava.lang.IllegalStateException
- if template is not foundpublic abstract FileTemplate getCodeTemplate(java.lang.String templateName)
templateName
- template namejava.lang.IllegalStateException
- if template is not foundpublic abstract FileTemplate [] getAllPatterns()
public abstract FileTemplate [] getAllCodeTemplates()
public abstract FileTemplate [] getAllJ2eeTemplates()
public abstract java.lang.String internalTemplateToSubject(java.lang.String templateName)
public abstract FileTemplate getPattern(java.lang.String name)
public abstract FileTemplate getDefaultTemplate(java.lang.String name)
public abstract void setTemplates(java.lang.String templatesCategory, java.util.Collection<? extends FileTemplate> templates)
public abstract void saveAllTemplates()