public abstract class JavaExpressionSurrounder extends java.lang.Object implements Surrounder
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<JavaExpressionSurrounder> |
EP_NAME |
EMPTY_ARRAY, myArrayFactory
Constructor and Description |
---|
JavaExpressionSurrounder() |
Modifier and Type | Method and Description |
---|---|
boolean |
isApplicable(PsiElement [] elements)
Checks if the template can be used to surround the specified range of elements.
|
abstract boolean |
isApplicable(PsiExpression expr) |
TextRange |
surroundElements(Project project,
Editor editor,
PsiElement [] elements)
Performs the Surround With action on the specified range of elements.
|
abstract TextRange |
surroundExpression(Project project,
Editor editor,
PsiExpression expr) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTemplateDescription
public static final ExtensionPointName<JavaExpressionSurrounder> EP_NAME
public boolean isApplicable(PsiElement [] elements)
Surrounder
isApplicable
in interface Surrounder
elements
- the elements to be surroundedpublic abstract boolean isApplicable(PsiExpression expr)
public TextRange surroundElements(Project project, Editor editor, PsiElement [] elements) throws IncorrectOperationException
Surrounder
surroundElements
in interface Surrounder
project
- the project containing the elements.editor
- the editor in which the action is invoked.elements
- the elements to be surrounded.IncorrectOperationException
public abstract TextRange surroundExpression(Project project, Editor editor, PsiExpression expr) throws IncorrectOperationException
IncorrectOperationException