TextRange (@NotNull Project project, @NotNull Editor editor, PsiElement @NotNull [] elements) { if (elements.length == 1) { ActionContext context = ActionContext.from(editor, elements[0].getContainingFile()); ModCommand command = new SurroundAutoCloseableAction().perform(context, elements[0]); ModCommandExecutor.getInstance().executeInteractively(context, command, editor); } return null; }