private static @NotNull FileTemplate getTemplateFromManager(@NotNull String templateName, @NotNull FTManager ftManager) {
    FileTemplateBase template = ftManager.getTemplate(templateName);
    if (template != null) {
      return template;
    }
    template = ftManager.findTemplateByName(templateName);
    if (template != null) {
      return template;
    }

    throw new IllegalStateException("Template not found: " + templateName);
  }
private static @NotNull FileTemplate getTemplateFromManager(@NotNull String templateName, @NotNull FTManager ftManager)