Eclipse Platform
2.0

org.eclipse.jface.text
Interface IRewriteTarget


public interface IRewriteTarget

A target publishing the required functions to modify a document that is displayed in the ui, such as in a text viewer. It provides access to the document and control over the redraw behavior and the batching of document changes into undo commands.

Since:
2.0
See Also:
ITextViewer, IDocument, IUndoManager

Method Summary
 void beginCompoundChange()
          If an undo manager is connected to the document's ui presentation, this method tells the undo manager to fold all subsequent changes into one single undo command until endCompoundChange is called.
 void endCompoundChange()
          If an undo manager is connected to the document's ui presentation, this method tells the undo manager to stop the folding of changes into a single undo command.
 IDocument getDocument()
          Returns the document of this target.
 void setRedraw(boolean redraw)
          Disables/enables redrawing of the ui while modifying the target's document.
 

Method Detail

getDocument

public IDocument getDocument()
Returns the document of this target.

Returns:
the document of this target

setRedraw

public void setRedraw(boolean redraw)
Disables/enables redrawing of the ui while modifying the target's document.

Parameters:
redraw - true if the document's ui presentation should be updated, false otherwise

beginCompoundChange

public void beginCompoundChange()
If an undo manager is connected to the document's ui presentation, this method tells the undo manager to fold all subsequent changes into one single undo command until endCompoundChange is called.


endCompoundChange

public void endCompoundChange()
If an undo manager is connected to the document's ui presentation, this method tells the undo manager to stop the folding of changes into a single undo command. After this call, all subsequent changes are considered to be individually undoable.


Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.