@SuppressWarnings("unchecked")
  public static <T extends TemplateContextType> @NotNull T getByClass(@NotNull Class<T> clazz) {
    LiveTemplateContext liveTemplateContext = LiveTemplateContextService.getInstance().getLiveTemplateContext(clazz);
    if (liveTemplateContext == null) {
      throw new IllegalStateException("Template context type with class " + clazz + " is not registered");
    }
    return (T)liveTemplateContext.getTemplateContextType();
  }
@SuppressWarnings("unchecked")
  public static <T extends TemplateContextType> @NotNull T getByClass(@NotNull Class<T> clazz)