| java.lang.Object org.eclipse.text.edits.TextEditProcessor
All known Subclasses: org.eclipse.jface.text.RewriteSessionEditProcessor,
Constructor Summary | |
public | TextEditProcessor(IDocument document, TextEdit root, int style) Constructs a new edit processor for the given
document.
Parameters: document - the document to manipulate Parameters: root - the root of the text edit tree describingthe modifications. |
TextEditProcessor | public TextEditProcessor(IDocument document, TextEdit root, int style)(Code) | | Constructs a new edit processor for the given
document.
Parameters: document - the document to manipulate Parameters: root - the root of the text edit tree describingthe modifications. By passing a text edit a a text editprocessor the ownership of the edit is transfered to thetext edit processors. Clients must not modify the edit(e.g adding new children) any longer. Parameters: style - TextEdit.NONE, TextEdit.CREATE_UNDO or TextEdit.UPDATE_REGIONS) |
canPerformEdits | public boolean canPerformEdits()(Code) | | Checks if the processor can execute all its edits.
true if the edits can be executed. Return false otherwise. One major reason why edits cannot be executed are wrongoffset or length values of edits. Calling perform in this case will verylikely end in a BadLocationException . |
checkIntegrityUndo | void checkIntegrityUndo()(Code) | | |
getDocument | public IDocument getDocument()(Code) | | Returns the document to be manipulated.
the document |
getRoot | public TextEdit getRoot()(Code) | | Returns the edit processor's root edit.
the processor's root edit |
performEdits | public UndoEdit performEdits() throws MalformedTreeException, BadLocationException(Code) | | Executes the text edits.
an object representing the undo of the executed edits exception: MalformedTreeException - is thrown if the edit tree isn'tin a valid state. This exception is thrown before any edit is executed.So the document is still in its original state. exception: BadLocationException - is thrown if one of the edits in thetree can't be executed. The state of the document is undefined if thisexception is thrown. |
|
|