@Override
  public void expand(@NotNull final String key, @NotNull final CustomTemplateCallback callback) {
    ThreadingAssertions.assertEventDispatchThread();

    Editor editor = callback.getEditor();
    PsiFile file = callback.getContext().getContainingFile();
    for (PostfixTemplateProvider provider : LanguagePostfixTemplate.LANG_EP.allForLanguage(getLanguage(callback))) {
      PostfixTemplate postfixTemplate = findApplicableTemplate(provider, key, editor, file);
      if (postfixTemplate != null) {
        expandTemplate(key, callback, editor, provider, postfixTemplate);
        return;
      }
    }

    // don't care about errors in multiCaret mode
    if (editor.getCaretModel().getAllCarets().size() == 1) {
      LOG.error("Template not found by key: " + key + "; offset = " + callback.getOffset(),
                CoreAttachmentFactory.createAttachment(callback.getFile().getVirtualFile()));
    }
  }
@Override
  public void expand(@NotNull final String key, @NotNull final CustomTemplateCallback callback)