Search in sources :

Example 1 with CommandUndoExecutedEvent

use of org.kie.workbench.common.stunner.core.command.event.local.CommandUndoExecutedEvent in project kie-wb-common by kiegroup.

the class GraphCommandManagerImpl method undo.

@Override
public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context, final Command<GraphCommandExecutionContext, RuleViolation> command) {
    final CommandResult<RuleViolation> result = commandManager.undo(context, command);
    if (null != commandUndoExecutedEvent) {
        final CommandUndoExecutedEvent event = new CommandUndoExecutedEvent(command, result);
        commandUndoExecutedEvent.fire(event);
    }
    return result;
}
Also used : RuleViolation(org.kie.workbench.common.stunner.core.rule.RuleViolation) CommandUndoExecutedEvent(org.kie.workbench.common.stunner.core.command.event.local.CommandUndoExecutedEvent)

Aggregations

CommandUndoExecutedEvent (org.kie.workbench.common.stunner.core.command.event.local.CommandUndoExecutedEvent)1 RuleViolation (org.kie.workbench.common.stunner.core.rule.RuleViolation)1