List<CustomLiveTemplate> (@NotNull TemplateActionContext templateActionContext) { List<CustomLiveTemplate> result = new ArrayList<>(); for (CustomLiveTemplate template : CustomLiveTemplate.EP_NAME.getExtensions()) { if ((!templateActionContext.isSurrounding() || template.supportsWrapping()) && isApplicable(template, templateActionContext)) { result.add(template); } } return result; }