public class TemplateImpl extends Template implements SchemeElement
Template.Property
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARG |
static java.lang.String |
END |
static java.util.Set<java.lang.String> |
INTERNAL_VARS_SET |
static java.lang.String |
SELECTION |
Constructor and Description |
---|
TemplateImpl(java.lang.String key,
java.lang.String group) |
TemplateImpl(java.lang.String key,
java.lang.String string,
java.lang.String group) |
Modifier and Type | Method and Description |
---|---|
void |
addEndVariable() |
void |
addSelectionEndVariable() |
void |
addSelectionStartVariable() |
void |
addTextSegment(java.lang.String text) |
Variable |
addVariable(Expression expression,
boolean isAlwaysStopAt) |
Variable |
addVariable(java.lang.String name,
Expression expression,
Expression defaultValueExpression,
boolean isAlwaysStopAt,
boolean skipOnStart) |
Variable |
addVariable(java.lang.String name,
java.lang.String expression,
java.lang.String defaultValue,
boolean isAlwaysStopAt) |
void |
addVariableSegment(java.lang.String name) |
void |
applyContext(TemplateContext context) |
void |
applyOptions(java.util.Map<TemplateOptionalProcessor,java.lang.Boolean> context) |
TemplateImpl |
copy() |
TemplateContext |
createContext() |
java.util.Map<TemplateOptionalProcessor,java.lang.Boolean> |
createOptions() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDefaultValueStringAt(int i) |
java.lang.String |
getDescription() |
int |
getEndSegmentNumber() |
java.lang.String |
getExpressionStringAt(int i) |
java.lang.String |
getGroupName() |
java.lang.String |
getId() |
java.lang.String |
getKey() |
java.lang.String |
getSegmentName(int i) |
int |
getSegmentOffset(int i) |
int |
getSegmentsCount() |
char |
getShortcutChar() |
java.lang.String |
getString() |
TemplateContext |
getTemplateContext() |
java.lang.String |
getTemplateText() |
int |
getVariableCount() |
java.lang.String |
getVariableNameAt(int i) |
java.util.ArrayList<Variable> |
getVariables() |
boolean |
hasArgument() |
int |
hashCode() |
boolean |
isAlwaysStopAt(int i) |
boolean |
isDeactivated() |
boolean |
isInline() |
boolean |
isSelectionTemplate() |
boolean |
isToIndent() |
boolean |
isToReformat() |
boolean |
isToShortenLongNames() |
void |
parseSegments() |
void |
removeAllParsed() |
void |
removeVariable(int i) |
void |
resetFrom(TemplateImpl another) |
void |
setDeactivated(boolean isDeactivated) |
void |
setDescription(java.lang.String value) |
void |
setGroupName(java.lang.String groupName) |
void |
setId(java.lang.String id) |
void |
setInline(boolean isInline)
Inline templates do not insert text.
|
void |
setKey(java.lang.String key) |
void |
setPrimarySegment(int segmentNumber) |
void |
setShortcutChar(char shortcutChar) |
void |
setString(java.lang.String string)
Set template text as it appears in Live Template settings, including variables surrounded with '$'.
|
void |
setToIndent(boolean toIndent) |
void |
setToReformat(boolean toReformat) |
void |
setToShortenLongNames(boolean toShortenLongNames) |
java.lang.String |
toString() |
addVariable, addVariable, getDefaultValue, getPresentation, getValue, setValue
public static final java.lang.String END
public static final java.lang.String SELECTION
public static final java.lang.String ARG
public static final java.util.Set<java.lang.String> INTERNAL_VARS_SET
public TemplateImpl(java.lang.String key, java.lang.String group)
public TemplateImpl(java.lang.String key, java.lang.String string, java.lang.String group)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isInline()
public void setInline(boolean isInline)
Template
setInline
in class Template
TemplateState.start(TemplateImpl, PairProcessor, Map)
public void addTextSegment(java.lang.String text)
addTextSegment
in class Template
public void addVariableSegment(java.lang.String name)
addVariableSegment
in class Template
public Variable addVariable(Expression expression, boolean isAlwaysStopAt)
addVariable
in class Template
public Variable addVariable(java.lang.String name, Expression expression, Expression defaultValueExpression, boolean isAlwaysStopAt, boolean skipOnStart)
addVariable
in class Template
public Variable addVariable(java.lang.String name, java.lang.String expression, java.lang.String defaultValue, boolean isAlwaysStopAt)
addVariable
in class Template
public void addEndVariable()
addEndVariable
in class Template
public void addSelectionStartVariable()
addSelectionStartVariable
in class Template
public void addSelectionEndVariable()
addSelectionEndVariable
in class Template
public TemplateImpl copy()
copy
in interface SchemeElement
public void resetFrom(TemplateImpl another)
public boolean isToReformat()
isToReformat
in class Template
public void setToReformat(boolean toReformat)
setToReformat
in class Template
public void setToIndent(boolean toIndent)
setToIndent
in class Template
public boolean isToIndent()
public boolean isToShortenLongNames()
isToShortenLongNames
in class Template
public void setToShortenLongNames(boolean toShortenLongNames)
setToShortenLongNames
in class Template
public void setDeactivated(boolean isDeactivated)
public boolean isDeactivated()
public TemplateContext getTemplateContext()
public int getEndSegmentNumber()
public java.lang.String getTemplateText()
getTemplateText
in class Template
Template.getString()
public java.lang.String getSegmentName(int i)
getSegmentName
in class Template
public int getSegmentOffset(int i)
getSegmentOffset
in class Template
public int getSegmentsCount()
getSegmentsCount
in class Template
public void parseSegments()
public void removeAllParsed()
public void removeVariable(int i)
public int getVariableCount()
public java.lang.String getVariableNameAt(int i)
public java.lang.String getExpressionStringAt(int i)
public java.lang.String getDefaultValueStringAt(int i)
public boolean isAlwaysStopAt(int i)
public java.lang.String getKey()
getKey
in interface SchemeElement
getKey
in class Template
public void setKey(java.lang.String key)
public java.lang.String getString()
getString
in class Template
Template.getTemplateText()
public void setString(java.lang.String string)
string
- template string textpublic java.lang.String getDescription()
getDescription
in class Template
public void setDescription(java.lang.String value)
public char getShortcutChar()
public void setShortcutChar(char shortcutChar)
public java.lang.String getGroupName()
public void setGroupName(java.lang.String groupName)
setGroupName
in interface SchemeElement
public boolean isSelectionTemplate()
public boolean hasArgument()
public void setId(java.lang.String id)
public java.util.Map<TemplateOptionalProcessor,java.lang.Boolean> createOptions()
public TemplateContext createContext()
public void applyOptions(java.util.Map<TemplateOptionalProcessor,java.lang.Boolean> context)
public void applyContext(TemplateContext context)
public java.util.ArrayList<Variable> getVariables()
public void setPrimarySegment(int segmentNumber)
public java.lang.String toString()
toString
in class java.lang.Object