@Nullable
 public static TemplateState getTemplateState(@NotNull Editor editor) {
   return editor.getUserData(TEMPLATE_STATE_KEY);
 }
 @Nullable
 public static AbstractInplaceIntroducer getActiveIntroducer(@Nullable Editor editor) {
   if (editor == null) return null;
   return editor.getUserData(ACTIVE_INTRODUCE);
 }