public void execute() { oldClassName = node.getClassName(); if (oldClassName != null && MSG_DEFAULT.equals(oldClassName)) { executed = false; return; } oldReferenceName = node.getReferenceName(); node.setClassName(MSG_DEFAULT); executed = true; }
public void undo() { if (!executed) return; node.setClassName(oldClassName); node.setReferenceName(oldReferenceName); }