Extension SDK 10.1.2

oracle.ide.cmd.buffer
Interface Edit


public interface Edit

The Edit interface contains a single method, applyEdit used to apply an edit (single or compound) to a document. IDE Addins can provide a class, which implements this interface, to do all the inserts and removes for a single undoable (or non-undoable) edit, and use the EditProcessor to apply the edit so that any notifications and undos are handled properly.

See Also:
EditProcessor

Method Summary
 void applyEdit(TextBuffer textBuffer)
          Applies the edits the first time through in proper sequence.
 java.lang.String getUndoName()
          Fetches the human-readable (translateable) name for this undo, typically displayed in the Edit->Undo menu item.
 boolean isUndoable()
          Fetches whether this edit should be undoable or not.
 

Method Detail

applyEdit

public void applyEdit(TextBuffer textBuffer)
Applies the edits the first time through in proper sequence. The caller will ensure that the text buffer is locked for the duration of this call, as well as handle any UpdateMessage and undo for this edit.

Parameters:
textBuffer - the text buffer to apply the edit to, this is associated with the document passed to the EditProcessor

isUndoable

public boolean isUndoable()
Fetches whether this edit should be undoable or not. If this edit is marked as non-undoable, the undo-stack for the document will be flushed as a consequence.

Returns:
whether this edit should be undoable or not

getUndoName

public java.lang.String getUndoName()
Fetches the human-readable (translateable) name for this undo, typically displayed in the Edit->Undo menu item.


Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.