1 package org.simantics.document.swt.core.base;
3 import org.simantics.document.server.IEventCommand;
4 import org.simantics.document.server.io.CommandContext;
5 import org.simantics.document.server.io.CommandContextMutable;
6 import org.simantics.document.swt.core.SWTDocument;
8 public abstract class AbstractEventCommand implements IEventCommand {
10 protected IEventCommand next;
11 protected SWTDocument document;
13 public AbstractEventCommand(SWTDocument document) {
14 this.document = document;
18 public void setNext(IEventCommand next) {
23 public IEventCommand getNext() {
28 public CommandContext commandSuccess(CommandContextMutable context) {
30 return next.handleCommand(context);
35 public void commandError(String errorMessage) {
36 System.err.println(this + " failed: " + errorMessage);