public final class EditDescriptor extends java.lang.Object
EditDescriptoris used to describe an edit operation that is undoable. It consists of an edit name that describes the edit in human-readable (and translated) terms which may be suitable for the "Edit->Undo" menu, and optionally a merge property name that can be looked up to determine whether this edit and another consecutive edit of the same type can be merged. Each edit is assigned a unique id, or type to distinguish it from other edits.
Currently, the merge property can only be specified by built in edits. (It complicates editor options UI greatly to allow arbitrary edits be mergeable.)
|Constructor and Description|
Creates a new
|Modifier and Type||Method and Description|
Returns whether the edit can be merged with the other edit.
Returns the name of this edit, which can be used as a human-readable representation for the "Edit->Undo" menu.
public EditDescriptor(java.lang.String editName)
EditDescriptorwith the given name. This name should be human-readable and translated as it may be used by editor implementations for the "Edit->Undo" menu.
editName- the name of the edit
public java.lang.String getEditName()
public boolean canMergeWith(EditDescriptor otherEdit)
otherEdit- the other edit to try to merge with