public class JavaWithTryCatchFinallySurrounder extends JavaWithTryCatchSurrounder
myGenerateFinallyEMPTY_ARRAY, myArrayFactory| Constructor and Description |
|---|
JavaWithTryCatchFinallySurrounder() |
| 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.
|
surroundStatementspublic java.lang.String getTemplateDescription()
SurroundergetTemplateDescription in interface SurroundergetTemplateDescription in class JavaWithTryCatchSurrounderpublic 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)