public interface TemplateBuilder
TemplateBuilderFactory
Modifier and Type | Method and Description |
---|---|
void |
replaceElement(PsiElement element,
Expression expression)
Creates a replacement box for the specified element with the specified expression.
|
void |
replaceElement(PsiElement element,
java.lang.String replacementText)
Creates a replacement box for the specified element with the specified initial value.
|
void |
replaceElement(PsiElement element,
TextRange rangeWithinElement,
Expression expression) |
void |
replaceElement(PsiElement element,
TextRange rangeWithinElement,
java.lang.String replacementText) |
void |
replaceRange(TextRange rangeWithinElement,
Expression expression)
Creates a replacement box for the specified text range within the container element.
|
void |
replaceRange(TextRange rangeWithinElement,
java.lang.String replacementText)
Creates a replacement box for the specified text range within the container element.
|
void |
run()
Deprecated.
does not work correctly for files with multiple editors use #run(Editor, boolean) instead
|
void |
run(Editor editor,
boolean inline)
Shows the live template and initiates editing process.
|
void replaceElement(PsiElement element, java.lang.String replacementText)
element
- the element to replace.replacementText
- the initial value for the replacement.void replaceElement(PsiElement element, TextRange rangeWithinElement, java.lang.String replacementText)
void replaceElement(PsiElement element, Expression expression)
element
- the element to replace.expression
- the replacement expression.void replaceElement(PsiElement element, TextRange rangeWithinElement, Expression expression)
void replaceRange(TextRange rangeWithinElement, java.lang.String replacementText)
rangeWithinElement
- range within the container element.replacementText
- the initial value for the replacement.void replaceRange(TextRange rangeWithinElement, Expression expression)
rangeWithinElement
- range within the container element.expression
- the replacement expression.@Deprecated void run()
void run(Editor editor, boolean inline)
editor
- editor to use to start editing process.inline
- if true then inline template will be created, regular otherwise