void (@NotNull ActionContext context, @NotNull PsiTryStatement tryStatement, @NotNull ModPsiUpdater updater) { PsiStatement replacement = JavaPsiFacade.getElementFactory(context.project()) .createStatementFromText(tryStatement.getText() + "finally {\n\n}", tryStatement); PsiTryStatement result = (PsiTryStatement)tryStatement.replace(replacement); moveCaretToFinallyBlock(updater, Objects.requireNonNull(result.getFinallyBlock())); }