use of org.eclipse.sirius.components.collaborative.api.IEditingContextEventHandler in project sirius-components by eclipse-sirius.
the class EditingContextEventProcessor method handleInput.
private void handleInput(One<IPayload> payloadSink, IInput input) {
if (input instanceof DeleteRepresentationInput) {
DeleteRepresentationInput deleteRepresentationInput = (DeleteRepresentationInput) input;
this.disposeRepresentation(deleteRepresentationInput.getRepresentationId());
}
// @formatter:off
Optional<IEditingContextEventHandler> optionalEditingContextEventHandler = this.editingContextEventHandlers.stream().filter(handler -> handler.canHandle(this.editingContext, input)).findFirst();
if (optionalEditingContextEventHandler.isPresent()) {
IEditingContextEventHandler editingContextEventHandler = optionalEditingContextEventHandler.get();
editingContextEventHandler.handle(payloadSink, this.changeDescriptionSink, this.editingContext, input);
} else {
// $NON-NLS-1$
this.logger.warn("No handler found for event: {}", input);
}
}
Aggregations