public class MoMLUndoEntry extends java.lang.Object implements UndoAction, ChangeListener
MoMLParser,
UndoStackAttribute,
MoMLChangeRequest| Red (cxh) |
| Yellow (eal) |
| Constructor and Description |
|---|
MoMLUndoEntry(NamedObj context,
java.lang.String undoMoML)
Create an undo entry comprised of the specified MoML code.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeExecuted(ChangeRequest change)
Do nothing.
|
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
Record the exception so that execute() can throw it.
|
void |
execute()
Parse the MoML specified in the constructor call in the context
specified in the constructor call using the parser associated
with the context (as determined by ParserAttribute.getParser()).
|
java.lang.String |
toString()
Return the MoML of the undo action.
|
public MoMLUndoEntry(NamedObj context, java.lang.String undoMoML)
context - The context in which to execute the undo.undoMoML - The MoML specification of the undo action.public void changeExecuted(ChangeRequest change)
changeExecuted in interface ChangeListenerchange - The change that was successfully executed.public void changeFailed(ChangeRequest change, java.lang.Exception exception)
changeFailed in interface ChangeListenerchange - The change that failed.exception - The exception that occurred.execute()public void execute()
throws java.lang.Exception
execute in interface UndoActionjava.lang.Exception - If something goes wrong.ParserAttribute.getParser(NamedObj)public java.lang.String toString()
toString in class java.lang.Object