TextRange (@NotNull Surrounder surrounder, @NotNull Editor editor, @NotNull PsiElement expr) { Project project = expr.getProject(); PsiElement[] elements = {expr}; if (surrounder.isApplicable(elements)) { return surrounder.surroundElements(project, editor, elements); } else { showErrorHint(project, editor); } return null; }