execute method

Command execute(
  1. Command cmd
)

Implementation

Command execute(Command cmd) {
  if ( Tracer.enabled)
    Tracer.trace("editor.history", TraceLevel.high, "add command");

  var wasDirty = isDirty();

  cmd.stack = this;

  _stack.add(cmd);
  cmd.execute();

  _changeDirty(wasDirty);

  return cmd;
}