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()
Surrounder
public TextRange surroundStatements(Project project, Editor editor, PsiElement container, PsiElement[] statements) throws IncorrectOperationException
IncorrectOperationException
public boolean isApplicable(PsiElement [] elements)
Surrounder
isApplicable
in interface Surrounder
elements
- the elements to be surroundedpublic 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
protected 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)