Method
execute(_:)
Execute a command and add it to the undo stack.
@MainActor func execute(_ command: EMFCommand) async throws -> any Sendable
Parameters
command-
The command to execute
Return Value
The result of command execution
Discussion
This method executes the provided command and, if successful, adds it to the undo stack for potential reversal. Any existing redo stack is cleared since new execution invalidates redo history.