@Override
  protected void prepare(final @NotNull SequentialTask task) {
    UIUtil.invokeAndWaitIfNeeded(() -> {
      Document document = myDocument.get();
      if (document != null) {
        myDocumentModificationStampBefore = document.getModificationStamp();
      }
      task.prepare();
    });
  }
@Override
  protected void prepare(final @NotNull SequentialTask task)