Interface EMFOperationHandler<O extends Operation>

    • Method Detail

      • getCommand

        default java.util.Optional<org.eclipse.emf.common.command.Command> getCommand​(Operation operation)
        Returns:
        the command to be applied to the EMF source model on the command stack for the given operation.
      • createCommand

        java.util.Optional<org.eclipse.emf.common.command.Command> createCommand​(O operation)
        Creates a command that performs the operation in the EMF source model(s).
        Parameters:
        operation - The operation to process.
        Returns:
        The created command to be executed on the command stack.
      • getOperationHandler

        static <O extends Operation> java.util.Optional<EMFOperationHandler<O>> getOperationHandler​(OperationHandlerRegistry registry,
                                                                                                    O operation)
        Returns the EMF operation handler for the given operation from the given operation handler registry.
        Type Parameters:
        O - operation type
        Parameters:
        registry - operation handler registry
        operation - operation
        Returns:
        the matching EMF operation handler from the registry or empty if no such handler is found
      • getCommand

        static java.util.Optional<org.eclipse.emf.common.command.Command> getCommand​(OperationHandlerRegistry registry,
                                                                                     Operation operation)
        Returns the matching EMF command for the given operation.
        Parameters:
        registry - operation handler registry
        operation - operation
        Returns:
        the matching EMF command for the given operation