@Override
  public void invoke(@NotNull final Project project, @NotNull final Editor editor, @NotNull PsiFile file) {
    if (!EditorModificationUtil.checkModificationAllowed(editor)) return;
    if (file instanceof PsiCompiledElement) {
      HintManager.getInstance().showErrorHint(editor, LangBundle.message("hint.text.can.t.modify.decompiled.code"));
      return;
    }

    Map<Surrounder, PsiElement[]> surrounders = computeSurrounders(editor, file);
    ReadAction.nonBlocking(() -> doBuildSurroundActions(project, editor, file, surrounders))
      .expireWhen(() -> editor.isDisposed() || project.isDisposed())
      .finishOnUiThread(ModalityState.nonModal(), applicable -> {
        if (applicable != null) {
          showPopup(editor, applicable);
        }
        else if (!ApplicationManager.getApplication().isUnitTestMode()) {
          HintManager.getInstance().showErrorHint(editor, LangBundle.message("hint.text.couldn.t.find.surround"));
        }
      })
      .submit(AppExecutorUtil.getAppExecutorService());
  }
@Override
  public void invoke(@NotNull final Project project, @NotNull final Editor editor, @NotNull PsiFile file)