@Override
  public void onChange(Messages messages) {
    for (Message message : messages) {
      MultistompDetails details = (MultistompDetails) message.details();
      if (details.origin instanceof Patch) details.patch = this.patchs.indexOf(details.origin);

      details.origin = this;
    }

    listeners.forEach(listener -> listener.onChange(messages));
  }
  public void toPatch(int index) {
    if (index >= patchs.size()) index = 0;
    else if (index < 0) index = patchs.size() - 1;

    idCurrentPatch = index;

    MultistompDetails details = new MultistompDetails();
    details.patch = idCurrentPatch;

    onChange(Messages.For(new MultistompMessage(CommonCause.TO_PATCH, details)));
  }