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, waitgetTemplateDescriptionpublic static final ExtensionPointName<JavaExpressionSurrounder> EP_NAME
public boolean isApplicable(PsiElement [] elements)
SurrounderisApplicable in interface Surrounderelements - the elements to be surroundedpublic abstract boolean isApplicable(PsiExpression expr)
public TextRange surroundElements(Project project, Editor editor, PsiElement [] elements) throws IncorrectOperationException
SurroundersurroundElements in interface Surrounderproject - the project containing the elements.editor - the editor in which the action is invoked.elements - the elements to be surrounded.IncorrectOperationExceptionpublic abstract TextRange surroundExpression(Project project, Editor editor, PsiExpression expr) throws IncorrectOperationException
IncorrectOperationException