use of org.jetbrains.plugins.groovy.lang.psi.api.statements.GrFinallyClause in project intellij-community by JetBrains.
the class GroovyTryUnwrapper method doUnwrap.
@Override
protected void doUnwrap(final PsiElement element, final Context context) throws IncorrectOperationException {
GrTryCatchStatement trySt = (GrTryCatchStatement) element;
context.extractFromCodeBlock(trySt.getTryBlock(), trySt);
GrFinallyClause finallyClause = trySt.getFinallyClause();
if (finallyClause != null) {
context.extractFromCodeBlock(finallyClause.getBody(), trySt);
}
context.delete(trySt);
}
Aggregations