private static @Nullable String expandTemplate(@NotNull String abbreviation, @NotNull PsiFile file, @NotNull Editor editor) throws EmmetException {
    final CollectCustomTemplateCallback callback = new CollectCustomTemplateCallback(editor, file);
    ZenCodingTemplate.expand(abbreviation, callback, XmlZenCodingGeneratorImpl.INSTANCE, Collections.emptyList(),
                             true, Registry.intValue("emmet.segments.limit"));
    TemplateImpl template = callback.getGeneratedTemplate();
    return template != null ? template.getTemplateText() : null;
  }
private static @Nullable String expandTemplate(@NotNull String abbreviation, @NotNull PsiFile file, @NotNull Editor editor)