private @NotNull Runnable @NotNull [] getAndClearActionsAfterCommit(@NotNull Document document) {
    List<Runnable> list = myActionsAfterCommit.remove(document);
    return list == null ? ArrayUtil.EMPTY_RUNNABLE_ARRAY : list.toArray(ArrayUtil.EMPTY_RUNNABLE_ARRAY);
  }
private @NotNull Runnable @NotNull [] getAndClearActionsAfterCommit(@NotNull Document document)