package org.simantics.document.swt.core.base; import org.simantics.document.server.IEventCommand; import org.simantics.document.swt.core.SWTDocument; public abstract class AbstractEventCommand implements IEventCommand { protected IEventCommand next; protected SWTDocument document; public AbstractEventCommand(SWTDocument document) { this.document = document; } @Override public void setNext(IEventCommand next) { this.next = next; } @Override public IEventCommand getNext() { return this.next; } @Override public void commandSuccess() { if(next != null) next.handleCommand(); } @Override public void commandError(String errorMessage) { System.err.println(this + " failed: " + errorMessage); } }