ITextEdit ITextEdit ITextEdit ITextEdit Interface

Definition

Represents a set of editing operations on an ITextBuffer. The positions of all edit operations are specified with respect to the state of the ITextBuffer at the time this object was created.

public interface class ITextEdit : IDisposable, Microsoft::VisualStudio::Text::ITextBufferEdit
public interface ITextEdit : IDisposable, Microsoft.VisualStudio.Text.ITextBufferEdit
type ITextEdit = interface
    interface ITextBufferEdit
    interface IDisposable
Public Interface ITextEdit
Implements IDisposable, ITextBufferEdit
Implements

Remarks

At most one ITextBufferEdit object may be active at a given time for a particular ITextBuffer. This object is considered active as long as it has been neither Applied nor Cancelled; calling Dispose on an unapplied object is equivalent to calling Cancel.

The operations performed using this object are not reflected in the ITextBuffer until the Apply() method has been called.

Properties

HasEffectiveChanges HasEffectiveChanges HasEffectiveChanges HasEffectiveChanges

Determines whether the edit has changes in non-read-only regions.

HasFailedChanges HasFailedChanges HasFailedChanges HasFailedChanges

Determines whether any changes failed to be added to this edit due to read-only regions.

Methods

Delete(Span) Delete(Span) Delete(Span) Delete(Span)

Deletes a sequence of characters from the buffer.

Delete(Int32, Int32) Delete(Int32, Int32) Delete(Int32, Int32) Delete(Int32, Int32)

Deletes a equence of characters from the buffer.

Insert(Int32, String) Insert(Int32, String) Insert(Int32, String) Insert(Int32, String)

Inserts the given text at the specified positionin the text buffer.

Insert(Int32, Char[], Int32, Int32) Insert(Int32, Char[], Int32, Int32) Insert(Int32, Char[], Int32, Int32) Insert(Int32, Char[], Int32, Int32)

Inserts an array of characters at the specified position in the ITextBuffer.

Replace(Span, String) Replace(Span, String) Replace(Span, String) Replace(Span, String)

Replaces a sequence of characters with different text. This method has the same effect as first deleting the characters in replaceSpan and then inserting replaceWith.

Replace(Int32, Int32, String) Replace(Int32, Int32, String) Replace(Int32, Int32, String) Replace(Int32, Int32, String)

Replaces a sequence of characters with different text. This method has the same effect as first deleting the charsToReplace and then inserting replaceWith.

Applies to