use of org.eclipse.sirius.components.collaborative.forms.dto.FormRefreshedEventPayload in project sirius-components by eclipse-sirius.
the class FormEventProcessor method refresh.
@Override
public void refresh(ChangeDescription changeDescription) {
if (this.shouldRefresh(changeDescription)) {
Form form = this.refreshForm();
this.currentForm.set(form);
if (this.sink.currentSubscriberCount() > 0) {
EmitResult emitResult = this.sink.tryEmitNext(new FormRefreshedEventPayload(changeDescription.getInput().getId(), form));
if (emitResult.isFailure()) {
// $NON-NLS-1$
String pattern = "An error has occurred while emitting a FormRefreshedEventPayload: {}";
this.logger.warn(pattern, emitResult);
}
}
}
}
use of org.eclipse.sirius.components.collaborative.forms.dto.FormRefreshedEventPayload in project sirius-components by eclipse-sirius.
the class FormEventProcessor method getOutputEvents.
@Override
public Flux<IPayload> getOutputEvents(IInput input) {
var initialRefresh = Mono.fromCallable(() -> new FormRefreshedEventPayload(input.getId(), this.currentForm.get()));
var refreshEventFlux = Flux.concat(initialRefresh, this.sink.asFlux());
// @formatter:off
return Flux.merge(refreshEventFlux, this.widgetSubscriptionManager.getFlux(input), this.subscriptionManager.getFlux(input));
// @formatter:on
}
Aggregations