@Nullable public static TemplateState getTemplateState(@NotNull Editor editor) { return editor.getUserData(TEMPLATE_STATE_KEY); }