public abstract class PostfixTemplate
extends java.lang.Object
EDITABLE TEMPLATES ================== Editable postfix template MUST know the provider that created it.
Editable postfix templates MUST provide proper equals/hashCode implementation. Equal postfix templates produces by the very same provider will overwrite each other.
Modifier | Constructor and Description |
---|---|
protected |
PostfixTemplate(java.lang.String name,
java.lang.String example)
Deprecated.
|
protected |
PostfixTemplate(java.lang.String name,
java.lang.String key,
java.lang.String example)
|
protected |
PostfixTemplate(java.lang.String id,
java.lang.String name,
java.lang.String example,
PostfixTemplateProvider provider) |
protected |
PostfixTemplate(java.lang.String id,
java.lang.String name,
java.lang.String key,
java.lang.String example,
PostfixTemplateProvider provider) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
calcDescription() |
boolean |
equals(java.lang.Object o) |
abstract void |
expand(PsiElement context,
Editor editor) |
java.lang.String |
getDescription() |
java.lang.String |
getExample() |
java.lang.String |
getId()
Template's identifier.
|
java.lang.String |
getKey()
Template's key.
|
java.lang.String |
getPresentableName() |
PostfixTemplateProvider |
getProvider() |
int |
hashCode() |
abstract boolean |
isApplicable(PsiElement context,
Document copyDocument,
int newOffset) |
boolean |
isBuiltin()
Builtin templates cannot be removed.
|
boolean |
isEditable()
Template can be edit.
|
boolean |
isEnabled(PostfixTemplateProvider provider) |
boolean |
startInWriteAction() |
@Deprecated protected PostfixTemplate(java.lang.String name, java.lang.String example)
PostfixTemplate(String, String, String, PostfixTemplateProvider)
protected PostfixTemplate(java.lang.String id, java.lang.String name, java.lang.String example, PostfixTemplateProvider provider)
@Deprecated protected PostfixTemplate(java.lang.String name, java.lang.String key, java.lang.String example)
protected PostfixTemplate(java.lang.String id, java.lang.String name, java.lang.String key, java.lang.String example, PostfixTemplateProvider provider)
protected java.lang.String calcDescription()
public java.lang.String getId()
public final java.lang.String getKey()
public java.lang.String getPresentableName()
public java.lang.String getDescription()
public java.lang.String getExample()
public boolean startInWriteAction()
public boolean isEnabled(PostfixTemplateProvider provider)
public abstract boolean isApplicable(PsiElement context, Document copyDocument, int newOffset)
public abstract void expand(PsiElement context, Editor editor)
public PostfixTemplateProvider getProvider()
public boolean isBuiltin()
public boolean isEditable()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object