public class JavaWithDoWhileSurrounder
extends java.lang.Object
EMPTY_ARRAY, myArrayFactory| Constructor and Description |
|---|
JavaWithDoWhileSurrounder() |
| Modifier and Type | Method and Description |
|---|---|
protected PsiStatement |
addAfter(PsiStatement statement,
PsiElement container,
PsiElement[] statements) |
protected static void |
addCodeBlockContents(PsiCodeBlock codeBlock,
PsiBlockStatement statement) |
protected static void |
addRangeWithinContainer(PsiCodeBlock codeBlock,
PsiElement container,
PsiElement[] statements,
boolean canBreak) |
java.lang.String |
getTemplateDescription()
Returns the user-visible name of the Surround With template.
|
boolean |
isApplicable(PsiElement [] elements)
Checks if the template can be used to surround the specified range of elements.
|
TextRange |
surroundElements(Project project,
Editor editor,
PsiElement [] elements)
Performs the Surround With action on the specified range of elements.
|
TextRange |
surroundStatements(Project project,
Editor editor,
PsiElement container,
PsiElement[] statements) |
public java.lang.String getTemplateDescription()
Surrounderpublic TextRange surroundStatements(Project project, Editor editor, PsiElement container, PsiElement[] statements) throws IncorrectOperationException
IncorrectOperationExceptionpublic boolean isApplicable(PsiElement [] elements)
SurrounderisApplicable in interface Surrounderelements - the elements to be surroundedpublic 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.IncorrectOperationExceptionprotected PsiStatement addAfter(PsiStatement statement, PsiElement container, PsiElement[] statements)
protected static void addRangeWithinContainer(PsiCodeBlock codeBlock, PsiElement container, PsiElement[] statements, boolean canBreak)
protected static void addCodeBlockContents(PsiCodeBlock codeBlock, PsiBlockStatement statement)