@Override
  public @NotNull ActionCallback invokeLater(@NotNull Runnable runnable, @NotNull ModalityState state, @NotNull Condition<?> expired) {
    if (expired.value(null)) {
      return ActionCallback.REJECTED;
    }
    ActionCallback callback = new ActionCallback();
    LaterInvocator.invokeLater(state, Conditions.alwaysFalse(), () -> {
      if (!expired.value(null)) {
        runnable.run();
      }
      callback.setDone();
    });
    return callback;
  }
@Override
  public @NotNull ActionCallback invokeLater(@NotNull Runnable runnable, @NotNull ModalityState state, @NotNull Condition<?> expired)