Interface ITemplate
-
- All Known Implementing Classes:
BslTemplate
public interface ITemplate
The template class, which contains all necessary information to compute proposals and define where it can be applied.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDescription()
Returns the description of the templateString
getName()
Returns the name of the template.String
getPattern()
Returns the pattern string for this template, which will be inserted after all variables are processedITemplateContext
getTemplateContext()
The template context that is used to check where template is applicableboolean
isAutoinsertable()
Whether this template can be inserted without calling content assist if previous text matches the namevoid
setDescription(String description)
Sets the description of the template to the given onevoid
setName(String name)
Sets the name of the template to the given onevoid
setPattern(String pattern)
Sets the pattern of the template to the given onevoid
setTemplateContext(ITemplateContext templateContext)
Sets the template context to given context
-
-
-
Method Detail
-
getName
String getName()
Returns the name of the template. This is its id and its trigger-word- Returns:
- The name of template, cannot be
null
-
getDescription
String getDescription()
Returns the description of the template- Returns:
- The description of template, cannot be
null
-
getTemplateContext
ITemplateContext getTemplateContext()
The template context that is used to check where template is applicable- Returns:
- The context where this template is applicable, cannot be
null
-
getPattern
String getPattern()
Returns the pattern string for this template, which will be inserted after all variables are processed- Returns:
- The pattern string, cannot be
null
-
setName
void setName(String name)
Sets the name of the template to the given one- Parameters:
name
- The name to set, cannot benull
-
setPattern
void setPattern(String pattern)
Sets the pattern of the template to the given one- Parameters:
pattern
- The pattern to set, cannot benull
-
setDescription
void setDescription(String description)
Sets the description of the template to the given one- Parameters:
description
- The description to set, cannot benull
-
isAutoinsertable
boolean isAutoinsertable()
Whether this template can be inserted without calling content assist if previous text matches the name- Returns:
- Whether this template can be autoinserted
-
setTemplateContext
void setTemplateContext(ITemplateContext templateContext)
Sets the template context to given context- Parameters:
templateContext
- The context to set, cannot benull
-
-